system.mes.oee.getCalculationRecord
Description
Retrieves an OEE Calculation Record by its ID. Returns None if no record exists with the given
ID, or if the record has been disabled.
Permissions
This method requires the OEE.READ.GET permission.
Syntax
system.mes.oee.getCalculationRecord(id)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
id | String (ULID) | False | The ID of the OEE Calculation Record. |
Returns
A JSON representation of an OeeCalculationRecordDTO, or None if not found.
| Name | Type | Nullable | Description | Default Value |
|---|---|---|---|---|
id | String | True | The ID of the record (ULID). | null |
locationId | String | False | Identifier of the associated location. | null |
locationPath | String | True | Path of the associated location (display only). | null |
periodType | String | False | Period granularity: HOUR, DAY, WEEK, MONTH, or SHIFT. | null |
startDate | Instant | False | Start of the period bucket (calendar-aligned). | null |
endDate | Instant | False | End of the period bucket (calendar-aligned). | null |
calculatedDate | Instant | False | When this record was computed. | null |
availability | Double | True | Availability metric (0.0 to 1.0). | null |
performance | Double | True | Performance metric (0.0 to 1.0). | null |
quality | Double | True | Quality metric (0.0 to 1.0). | null |
oee | Double | True | Overall Equipment Effectiveness metric (0.0 to 1.0). | null |
teep | Double | True | Total Effective Equipment Performance metric (0.0 to 1.0). | null |
totalDurationSec | Double | False | Total duration of the period in seconds. | 0.0 |
scheduledDurationSec | Double | False | Duration scheduled for production in seconds. | 0.0 |
runningDurationSec | Double | False | Duration the machine was actively running in seconds. | 0.0 |
downtimeDurationSec | Double | False | Duration in downtime state in seconds. | 0.0 |
scheduledDowntimeDurationSec | Double | False | Duration in scheduled downtime mode in seconds. | 0.0 |
unscheduledDowntimeDurationSec | Double | False | Duration in unscheduled downtime mode in seconds. | 0.0 |
productionCount | Double | False | Total units produced during the period. | 0.0 |
expectedProductionCount | Double | False | Expected units to be produced during the period. | 0.0 |
goodCount | Double | False | Total good units recorded during the period. | 0.0 |
wasteCount | Double | False | Total waste units recorded during the period. | 0.0 |
Code Examples
# Retrieve a calculation record by its ID
recordId = "01JCH3ENEB-SV2X8B3W-NFY8WZNK"
record = system.mes.oee.getCalculationRecord(recordId)
if record is not None:
print "OEE:", record['oee']
else:
print "No record found with ID:", recordId