Skip to main content

system.mes.oee.getMode

Description

Retrieves an OEE Mode record by its ID.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getMode(id)

Parameters

ParameterTypeNullableDescription
idString (ULID)FalseThe ULID of the OEE mode to retrieve.

Returns

A JSON representation of an OeeModeDTO object.

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the OEE Modenull
locationIdStringFalseIdentifier of the associated locationnull
locationPathStringTruePath to the associated locationnull
codeIntegerFalseInteger value representing the modenull
nameStringFalseName of the modenull
calculationTypeOeeModeCalculationTypeFalseSpecifies how this mode should be factored into OEE calculationsSCHEDULED_PRODUCTION
expectedDurationSourceOeeModeExpectedDurationSourceFalseDefines the source used to determine the expected duration of a scheduled downtime eventSTATIC
expectedDurationExpressionStringTrueIgnition expression to dynamically calculate the expected duration of the mode in secondsnull
expectedDurationDoubleTrueExpected duration of the mode in seconds0.0
colorStringFalseHex color code representing the mode visually"#000000"
notesStringTrueNotes associated with the OEE Modenull
enabledbooleanTrueIndicates whether the OEE Mode is enabledtrue
spare1StringTrueExtra field 1null
spare2StringTrueExtra field 2null
spare3StringTrueExtra field 3null

Code Examples

# Retrieve an OEE mode by ID
modeId = "01JCH3ENEB-SV2X8B3W-NFY8WZNK"

try:
mode = system.mes.oee.getMode(modeId)
print "Mode Name:", mode['name']
print "Calculation Type:", mode['calculationType']
except Exception as e:
print "Error retrieving mode:", str(e)