system.mes.oee.updateEquipmentStateValues

Sepasoft MES Module Suite

Description

Change the reason for a downtime event for a line or cell group based on a timestamp range.

This is useful to update multiple downtime events when they are rolled up into a single entry.

Syntax

system.mes.oee.updateEquipmentStateValues(equipmentPath, reasonEquipmentPath, newEquipmentPath, fromStateTimeStamp, toStateTimeStamp, newStateCode)


  • Parameters

String equipmentPath - The equipment path for the line or if managing downtime events for a cell group, the equipment path for the cell group.

String reasonEquipmentPath - The equipment path for the original equipment that caused the downtime event.

String newEquipmentPath - The equipment path for the new equipment item to blame for the downtime event. This can be the same equipment path for the currently blamed equipment but provides a method to change the blamed equipment.

Date fromStateTimeStamp - The starting timestamp to begin updating downtime events.

Date toStateTimeStamp - The ending timestamp to end updating downtime events.

Integer newStateCode - The new equipment state code as an integer. This value should match a code assigned to a state associated with the specified equipment.

  • Returns

Nothing

  • Scope

All

Code Examples

Code Snippet

Code
# Changing the equipment state on Sealer to 3 of all states between the begin and end time stamp 

equipment_path = 'Enterprise\Site\Area\Line 2'
reason_equipment_path = 'Enterprise\Site\Area\Line 2\Sealer'
new_equipment_path = 'Enterprise\Site\Area\Line 2\Sealer'
new_state = 3

system.mes.oee.updateEquipmentStateValues(equipment_path, reason_equipment_path, new_equipment_path, begin, end, new_state)

Code Snippet

Code
# Changing the equipment state to 3 and blame the filler of all states between the begin and end time stamp 

equipment_path = 'Enterprise\Site\Area\Line 2'
reason_equipment_path = 'Enterprise\Site\Area\Line 2\Sealer'
new_equipment_path = 'Enterprise\Site\Area\Line 2\Filler'
new_state = 3

system.mes.oee.updateEquipmentStateValues(equipment_path, reason_equipment_path, new_equipment_path, begin, end, new_state)

Sepasoft MES Module Suite