Skip to main content
Version: V2 (Ignition 8.1)

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

ParameterTypeNullableDescription
locationIdOrPathStringFalseThe location ID (ULID) or path to retrieve OEE records for.
startDateDateFalseThe start date/time for the query range.
endDateDateTrueThe end date/time for the query range. Defaults to now if omitted.

Returns

Returns a list of JSON representations of OeeRecordDTO objects.

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the OEE Recordnull
locationIdStringFalseIdentifier of the associated locationnull
locationPathStringTruePath of the location where this OEE record was capturednull
locationNameStringTrueName of the associated locationnull
statusStatusFalseStatus of the OEE record (e.g., running, faulted, canceled, complete)UNKNOWN
startDateInstantFalseStart date and time of the OEE recordInstant.now()
endDateInstantTrueEnd date and time of the OEE recordnull
totalDurationSecDoubleFalseTotal duration of the OEE record in seconds0.0
productionCountDoubleFalseTotal number of units produced during this record period0.0
expectedProductionCountDoubleFalseExpected number of units to be produced during this record period0.0
qualityStrategyStringFalseQuality Strategy for this OEE RecordGOOD_COUNT
qualityCountDoubleFalseTotal number of quality units recorded during this period0.0
productionCountUnitOfMeasureIdStringTrueIdentifier of the unit of measure for the production countnull
productionCountUnitOfMeasureNameStringTrueName of the unit of measure for the production countnull
productionCountUnitOfMeasureSymbolStringTrueSymbol of the unit of measure for the production countnull
productionRateTimeUnitsStringFalseUnit of measure for the machine production rate and standard rateMINUTES
stateRecordIdStringTrueIdentifier of the associated state recordnull
standardRateDoubleTrueThe standard rate for this record0.0
productionOrderIdStringTrueThe ID of the production order associated with this OEE recordnull
productionOrderNameStringTrueThe name of the production order associated with this OEE recordnull
notesStringTrueNotes associated with the OEE Recordnull
enabledbooleanTrueIndicates whether the OEE Record is enabledtrue
spare1StringTrueExtra field 1null
spare2StringTrueExtra field 2null
spare3StringTrueExtra field 3null

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'])