system.mes.oee.splitEquipmentStateValues

Sepasoft MES Module Suite

system.mes.oee.splitEquipmentStateValues(baseEquipmentPath, reasonEquipmentPath, stateTimeStamp, splitTimesOccurences, eventTimeStamp, toTimeStamp)

Separate multiple rolled up downtime events into separate downtime events.

Based on the roll up time span, consecutive downtime events caused by the same reason will be rolled up.

This script function is useful to separate them and assign different reasons to each. 

Warning

If a downtime event that has a note is split, the note will only stay on the original downtime reason and not be copied over (duplicated) to the new split state.

Syntax

system.mes.oee.splitEquipmentStateValues(baseEquipmentPath, reasonEquipmentPath, stateTimeStamp, splitTimesOccurences, eventTimeStamp, toTimeStamp)

Parameters

String baseEquipmentPath - 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.

Date, Integer splitTimesOccurrences - Map of date to downtime occurrence count. The keys should be event timestamps, the value should be the occurrence count for that event timestamp.

Version dependent: 3.81.11 SP4

Date eventTimeStamp - The timestamp of the line or cell group downtime event. Note that is not always the same as the timestamp of the state that cause the downtime event. 

Date toTimeStamp - The timestamp to stop separating the rolled up downtime events.

Returns

Nothing

Scope

All

Example

Python
# Split all rolled up events that happened 10 seconds after the state change

base_equipment_path = 'Enterprise\Site\Area\Line 2'
reason_equipment_path = 'Enterprise\Site\Area\Line 2\Filler'
split_time_stamp = system.date.addSeconds(state_time_stamp, 10)


system.mes.oee.splitEquipmentStateValue(base_equipment_path, reason_equipment_path, state_time_stamp, event_time_stamp, to_time_stamp)  

Sepasoft MES Module Suite