Skip to main content
Version: V3 (Ignition 8.3)

system.mes.oee.getCalculationRecords

Description

Returns pre-computed OEE calculation records for the given location, period type, and date range, ordered by startDate ascending. These records are generated by the nightly backfill job and can also be rebuilt on demand with rebuildCalculationRecords.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getCalculationRecords(locationIdOrPath, periodType, startDate, endDate)

Parameters

ParameterTypeNullableDescription
locationIdOrPathStringFalseLocation ID (ULID) or path.
periodTypeStringFalsePeriod granularity: "HOUR", "DAY", "WEEK", "MONTH", or "SHIFT".
startDateDateFalseStart of the query range (inclusive).
endDateDateFalseEnd of the query range (inclusive).

Returns

A JSON list of OeeCalculationRecordDTO objects ordered by startDate ascending.

NameTypeNullableDescriptionDefault Value
idStringTrueThe ID of the record (ULID).null
locationIdStringFalseIdentifier of the associated location.null
locationPathStringTruePath of the associated location (display only).null
periodTypeStringFalsePeriod granularity: HOUR, DAY, WEEK, MONTH, or SHIFT.null
startDateInstantFalseStart of the period bucket (calendar-aligned).null
endDateInstantFalseEnd of the period bucket (calendar-aligned).null
calculatedDateInstantFalseWhen this record was computed.null
availabilityDoubleTrueAvailability metric (0.0 to 1.0).null
performanceDoubleTruePerformance metric (0.0 to 1.0).null
qualityDoubleTrueQuality metric (0.0 to 1.0).null
oeeDoubleTrueOverall Equipment Effectiveness metric (0.0 to 1.0).null
teepDoubleTrueTotal Effective Equipment Performance metric (0.0 to 1.0).null
totalDurationSecDoubleFalseTotal duration of the period in seconds.0.0
scheduledDurationSecDoubleFalseDuration scheduled for production in seconds.0.0
runningDurationSecDoubleFalseDuration the machine was actively running in seconds.0.0
downtimeDurationSecDoubleFalseDuration in downtime state in seconds.0.0
scheduledDowntimeDurationSecDoubleFalseDuration in scheduled downtime mode in seconds.0.0
unscheduledDowntimeDurationSecDoubleFalseDuration in unscheduled downtime mode in seconds.0.0
productionCountDoubleFalseTotal units produced during the period.0.0
expectedProductionCountDoubleFalseExpected units to be produced during the period.0.0
wasteCountDoubleFalseTotal waste units recorded during the period.0.0
goodCountDoubleFalseTotal good units recorded during the period.0.0

Code Examples

from java.util import Date
import system.date

# Get all daily records for the past week
location = "Enterprise/Site/Line1"
endDate = Date()
startDate = system.date.addDays(endDate, -7)

records = system.mes.oee.getCalculationRecords(location, "DAY", startDate, endDate)
for record in records:
print record['startDate'], "OEE:", record['oee']