Skip to main content

system.mes.oee.getOeeModeRecord

Description

Retrieves a specific OEE mode record by its unique identifier.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getOeeModeRecord(id)

Parameters

ParameterTypeNullableDescription
idString (ULID)FalseThe unique identifier of the mode record to retrieve.

Returns

A JSON representation of an OeeModeRecordDTO object containing the details of the specified mode record.

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the OEE Mode Recordnull
locationIdStringFalseIdentifier of the associated location where this mode was recordednull
locationNameStringTrueName of the associated locationnull
locationPathStringTruePath of the associated location where this mode was recordednull
codeIntegerFalseInteger mode numbernull
statusStatusFalseStatus of the OEE production record (running, faulted, cancelled, complete etc.)UNKNOWN
startDateInstantFalseStart date and time of the mode recordInstant.now()
endDateInstantTrueEnd date and time of the mode recordnull
durationDoubleFalseTotal duration of the mode record in seconds0.0
overrunDurationSecDoubleFalseDuration in seconds that the machine has overrun its scheduled downtime0.0
nameStringFalseName of the modenull
calculationTypeOeeModeCalculationTypeFalseSpecifies how this mode should be factored into OEE calculationsSCHEDULED_PRODUCTION
colorStringFalseHex color code representing the mode visually"#000000"
expectedDurationDoubleTrueExpected duration of the mode in seconds0.0
notesStringTrueNotes associated with the OEE Mode Recordnull
enabledbooleanTrueIndicates whether the OEE Mode Record is enabledtrue
spare1StringTrueExtra field 1null
spare2StringTrueExtra field 2null
spare3StringTrueExtra field 3null

Code Examples

# Get a specific mode record by its ID
recordId = "01JDBQ7Y2B-QZ8XJ9XJ-V2QZJ9XJ"
modeRecord = system.mes.oee.getOeeModeRecord(recordId)

if modeRecord:
print "Mode Name:", modeRecord['name']
print "Duration (sec):", modeRecord['duration']