system.mes.oee.addEquipmentStateValue

Sepasoft MES Module Suite

system.mes.oee.addEquipmentStateValue(equipmentPath, dateTime, value)

Add a new equipment state value at the specified date and time. This can be used for manually adding new downtime events to an equipment item.

If a state already exists for the specified equipment and dateTime, then an exception will be thrown.

Syntax

system.mes.oee.addEquipmentStateValue(equipmentPath, dateTime, value)

Parameters

String equipmentPath - The equipment path of the line, cell group or cell to add the new equipment state.

Date dateTime - The date and time to use when recording the new state. If dateTime is in the future, the current gateway time will be used instead.

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

Returns

Nothing

Scope

All

Code Example

Python
# This will add an Equipment State of 1 to Enterprise\Site\Area\Line 1 at the current time


system.mes.oee.addEquipmentStateValue('Enterprise\Site\Area\Line 1', system.date.now(), 1)

Sepasoft MES Module Suite