system.mes.oee.getAllOeeRecords
Description
Retrieves all OEE Records for a specific location within a given time range.
Permissions
This method requires the OEE.READ.GET permission.
Syntax
system.mes.oee.getAllOeeRecords(locationIdOrPath, startDate, endDate=None)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
locationIdOrPath | String | False | The location ID (ULID) or path to retrieve OEE records for. |
startDate | Date | False | The start date/time for the query range. |
endDate | Date | True | The end date/time for the query range. Defaults to now if omitted. |
Returns
Returns a list of JSON representations of OeeRecordDTO objects.
| Name | Type | Nullable | Description | Default Value |
|---|---|---|---|---|
id | String | True | The id of the OEE Record | null |
locationId | String | False | Identifier of the associated location | null |
locationPath | String | True | Path of the location where this OEE record was captured | null |
locationName | String | True | Name of the associated location | null |
status | Status | False | Status of the OEE record (e.g., running, faulted, canceled, complete) | UNKNOWN |
startDate | Instant | False | Start date and time of the OEE record | Instant.now() |
endDate | Instant | True | End date and time of the OEE record | null |
totalDurationSec | Double | False | Total duration of the OEE record in seconds | 0.0 |
productionCount | Double | False | Total number of units produced during this record period | 0.0 |
expectedProductionCount | Double | False | Expected number of units to be produced during this record period | 0.0 |
qualityStrategy | String | False | Quality Strategy for this OEE Record | GOOD_COUNT |
qualityCount | Double | False | Total number of quality units recorded during this period | 0.0 |
productionCountUnitOfMeasureId | String | True | Identifier of the unit of measure for the production count | null |
productionCountUnitOfMeasureName | String | True | Name of the unit of measure for the production count | null |
productionCountUnitOfMeasureSymbol | String | True | Symbol of the unit of measure for the production count | null |
productionRateTimeUnits | String | False | Unit of measure for the machine production rate and standard rate | MINUTES |
stateRecordId | String | True | Identifier of the associated state record | null |
standardRate | Double | True | The standard rate for this record | 0.0 |
productionOrderId | String | True | The ID of the production order associated with this OEE record | null |
productionOrderName | String | True | The name of the production order associated with this OEE record | null |
notes | String | True | Notes associated with the OEE Record | null |
enabled | boolean | True | Indicates whether the OEE Record is enabled | true |
spare1 | String | True | Extra field 1 | null |
spare2 | String | True | Extra field 2 | null |
spare3 | String | True | Extra field 3 | null |
Code Examples
from java.util import Date
from java.util.concurrent import TimeUnit
locationPath = "Enterprise/Site/Production/Line1"
endTime = Date()
startTime = Date(endTime.getTime() - TimeUnit.HOURS.toMillis(24))
records = system.mes.oee.getAllOeeRecords(locationPath, startTime, endTime)
for record in records:
print("ID:", record['id'])
print("Start:", record['startDate'])
print("Status:", record['status'])