Skip to main content

system.mes.oee.findAlarmRecordsForStateRecord

Description

Finds all OEE Alarm Records associated with a specific OEE State Record.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.findAlarmRecordsForStateRecord(stateRecordId)

Parameters

ParameterTypeNullableDescription
stateRecordIdString (ULID)FalseThe ID of the state record to find alarms for.

Returns

Returns a list of JSON objects representing OeeAlarmRecordDTO objects associated with the state record.

Each object has the following properties:

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the OEE Alarm Recordnull
locationIdStringFalseIdentifier of the associated locationnull
locationPathStringTruePath of the location where this state record was recordednull
oeeStateRecordIdStringTrueOee State Record Id active at this location at this timenull
oeeStateRecordCodeIntegerTrueOee State Record code active at this location at this timenull
nameStringFalseThe alarm name as configured in Ignitionnull
ignitionAlarmIdStringFalseUnique identifier of the alarm instance in Ignitionnull
sourceStringFalseThe tag path or source that generated this alarmnull
priorityAlarmPriorityTrueThe configured priority level of the alarmnull
displayPathStringFalseThe hierarchical display path of the alarm in the tag structurenull
labelStringFalseThe human-readable display name for the alarmnull
activeDateInstantFalseIndicates when the alarm condition became activeInstant.now()
clearedDateInstantTrueIndicates when the alarm condition clearednull
acknowledgedDateInstantTrueIndicates if the alarm has been acknowledged by an operatornull
shelvedDateInstantTrueIndicates if the alarm has been temporarily suppressednull
stateAlarmStateFalseThe current state of the alarm in Ignition's state machinenull
lastEventStateAlarmStateTransitionFalseThe most recent state transition that occurred for this alarmnull
availabilityReasonCodeOverrideIntegerTrueOptional availability reason code overridenull
stateCodeOverrideIntegerTrueOptional state code overridenull
notesStringTrueNotes associated with the OEE Alarm Recordnull
enabledbooleanTrueIndicates whether the OEE Alarm Record is enabledtrue
spare1StringTrueExtra field 1 for the OEE Alarm Recordnull
spare2StringTrueExtra field 2 for the OEE Alarm Recordnull
spare3StringTrueExtra field 3 for the OEE Alarm Recordnull

Code Examples

# Find all alarms for a state record
alarmRecords = system.mes.oee.findAlarmRecordsForStateRecord('01JAP8RJBN-8ZTPXSGY-J9GSDPE1')

# Output the alarms
for alarm in alarmRecords:
print "Alarm ID:", alarm['id'], "Priority:", alarm['priority']