Skip to main content

system.mes.oee.getAllModesForLocation

Description

Retrieves all OEE Modes associated with a specific location.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getAllModesForLocation(locationIdOrPath)

Parameters

ParameterTypeNullableDescription
locationIdOrPathStringFalseThe ULID or path of the location to get modes for.

Returns

A list of JSON objects representing OeeModeDTO objects for the specified location. Returns an empty list if no modes are found.

Each object has the following properties:

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

# Get all modes for a specific location by path
locationPath = "Enterprise/Site/Area/Line1"
modes = system.mes.oee.getAllModesForLocation(locationPath)

for mode in modes:
print mode['name'], mode['code']