Skip to main content

system.mes.oee.getAllStatesForLocation

Description

Retrieves all OEE States associated with a specific location.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getAllStatesForLocation(locationIdOrPath)

Parameters

ParameterTypeNullableDescription
locationIdOrPathStringFalseThe location ID or path to get states for.

Returns

A list of JSON representations of OeeStateDTO objects for the specified location.

Each object has the following properties:

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the OEE Statenull
locationIdStringFalseIdentifier of the associated locationnull
locationPathStringTruePath of the associated locationnull
codeIntegerFalseInteger state number, which must be unique for a given locationnull
nameStringFalseName of the statenull
calculationTypeOeeStateCalculationTypeFalseSpecifies how this state contributes to OEE calculationsDOWNTIME
colorStringFalseHex color code representing the state visually"#000000"
autoAcknowledgeBooleanFalseWhether to automatically acknowledge the state record when it is createdfalse
interruptionLocationIdStringTrueImmediate interruption location that caused a blocked/starved statenull
interruptionLocationPathStringTruePath to the location that caused a blocked/starved statenull
maxRootCauseDelaySecondsIntegerTrueMaximum delay in seconds for looking back at historical state records when resolving root cause for blocked/starved states0
notesStringTrueNotes associated with the OEE Statenull
enabledbooleanTrueIndicates whether the OEE State is enabledtrue
spare1StringTrueExtra field 1null
spare2StringTrueExtra field 2null
spare3StringTrueExtra field 3null

Code Examples

# Get all OEE states for a location
location = "Enterprise/Site/Area/ProductionLine1"
states = system.mes.oee.getAllStatesForLocation(location)

for state in states:
print state['name'], state['code']