system.mes.getCurrentEquipmentStates

Sepasoft MES Module Suite

system.mes.getCurrentEquipmentStates(equipmentPathFilter, lookbackHours)

Return current equipment states by equipment path

Syntax

system.mes.getCurrentEquipmentStates(equipmentPathFilter, lookbackHours)

  • Parameters

String equipmentPathFilter - see example in the code block below.

Int lookbackHoursOptionally provide a number of hours to lookback for finding blame in events that happened prior to the begin date time. Value must be a positive integer to be used.

  • Returns

Map<String, EquipmentState> - A map containing the equipment path in the key and the EquipmentState object in the value. See EquipmentState object documentation for details.

  • Scope

All

Code Examples

Python
Area = '\Nuts Unlimited\Sandbox\Sandbox\Area 1'
Line = '\Nuts Unlimited\Sandbox\Sandbox\Area 1\Line 1'
CellA = '\Nuts Unlimited\Sandbox\Sandbox\Area 1\Line 1\Cell A'
CellB = '\Nuts Unlimited\Sandbox\Sandbox\Area 1\Line 1\Cell B'
print system.mes.getCurrentEquipmentStates(CellA)
print system.mes.getCurrentEquipmentStates(CellB)
print system.mes.getCurrentEquipmentStates(Line)
out = system.mes.getCurrentEquipmentStates(Area)
for key in out:
    if 'Line 1' in key:
    print key, out[key] 

Sepasoft MES Module Suite