system.mes.oee.revertEquipmentStateValue

Sepasoft MES Module Suite

Description

Revert a previously updated (overridden) line or cell group downtime event reason back to the original value.

This will also revert the blame back to the original equipment item, if it was previously changed.

It can also be used to revert a state split event, by passing in the start date of the original event.

Syntax

system.mes.oee.revertEquipmentStateValue(equipmentPath, reasonEquipmentPath, stateTimeStamp)


  • 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.

Date stateTimeStamp - The timestamp of the state that is at the source of the downtime event.

Error

The state timestamp is not always the same as the downtime event timestamp and using the downtime event timestamp will not always produce consistent results.


  • Returns

Nothing

  • Scope

All

Code Examples

Code Snippet

Code
# The Equipment State was changed from blaming Sealer to blame the Filler, which was incorrect.
# This scripting function will revert that change back to blaming Sealer.


equipment_path = 'Enterprise\Site\Area\Line 2'
old_equipment_path = 'Enterprise\Site\Area\Line 2\Sealer'


system.mes.oee.revertEquipmentStateValue(equipment_path, old_equipment_path, old_date)

Sepasoft MES Module Suite