Sepasoft MES Module Suite
system.mes.getEquipmentModeHistory
This script function is used to get the history of equipment mode.
Method options
system.mes.getEquipmentModeHistory(equipmentPath, beginDateTime, endDateTime, includeChildren)
Description
Return the equipment mode history.
Syntax
system.mes.getEquipmentModeHistory(equipmentPath, beginDateTime, endDateTime, includeChildren)
- Parameters
String equipmentPath - The path of equipment to return the mode history for.
Date beginDateTime - The begin date time.
Date endDateTime - The end date time.
String includeChildren - If true, include mode history for children.
- Returns
Dataset - A dataset containing the equipment mode history.
- Scope
All
Python |
equipmentPath = event.source.parent.getComponent('MES Object Selector').equipmentItemPath runLookBackCount = 2 includeChildren = False dataset = system.mes.getEquipmentModeHistory(equipmentPath, runLookBackCount, includeChildren) print dataset.getColumnNames() for row in range(dataset.getRowCount()): s = `row` + ': ' for column in dataset.getColumnNames(): s += `column` + ": " + `dataset.getValueAt(row, column)` + " || " print s |
Output
Code |
[Equipment Cell Order, Equipment Path, Mode Begin Time, Mode End Time, Equipment Mode Object, Mode Duration] 0: u'Equipment Cell Order': -2147483648 || u'Equipment Path': u'New Enterprise\New Site\New Area\New Line' || u'Mode Begin Time': Fri Sep 07 19:57:13 UTC 2018 || u'Mode End Time': Fri Sep 07 19:58:14 UTC 2018 || u'Equipment Mode Object': Changeover [CHANGEOVER] || u'Mode Duration': 1.0166666666666666 || 1: u'Equipment Cell Order': -2147483648 || u'Equipment Path': u'New Enterprise\New Site\New Area\New Line' || u'Mode Begin Time': Fri Sep 07 19:58:14 UTC 2018 || u'Mode End Time': Fri Sep 07 21:10:21 UTC 2018 || u'Equipment Mode Object': Production [PRODUCTION] || u'Mode Duration': 72.11666666666666 || |
system.mes.getEquipmentModeHistory(equipmentPath, runLookBackCount, includeChildren)
Description
Return the equipment mode history.
Syntax
system.mes.getEquipmentModeHistory(equipmentPath, runLookBackCount, includeChildren)
- Parameters
String equipmentPath - The path of equipment to return the mode history for.
Integer runLookBackCount - The number of runs to return mode history for from the current date and time. Set to 1 to return only the current / last run.".
String includeChildren - If true, include mode history for children.
- Returns
Dataset - A dataset containing the equipment mode history.
- Scope
All
Python |
equipmentPath = event.source.parent.getComponent('MES Object Selector').equipmentItemPath runLookBackCount = 2 includeChildren = False dataset = system.mes.getEquipmentModeHistory(equipmentPath, runLookBackCount, includeChildren) print dataset.getColumnNames() for row in range(dataset.getRowCount()): s = `row` + ': ' for column in dataset.getColumnNames(): s += `column` + ": " + `dataset.getValueAt(row, column)` + " || " print s |
Output
Code |
[Equipment Cell Order, Equipment Path, Mode Begin Time, Mode End Time, Equipment Mode Object, Mode Duration] 0: u'Equipment Cell Order': -2147483648 || u'Equipment Path': u'New Enterprise\New Site\New Area\New Line' || u'Mode Begin Time': Fri Sep 07 19:57:13 UTC 2018 || u'Mode End Time': Fri Sep 07 19:58:14 UTC 2018 || u'Equipment Mode Object': Changeover [CHANGEOVER] || u'Mode Duration': 1.0166666666666666 || 1: u'Equipment Cell Order': -2147483648 || u'Equipment Path': u'New Enterprise\New Site\New Area\New Line' || u'Mode Begin Time': Fri Sep 07 19:58:14 UTC 2018 || u'Mode End Time': Fri Sep 07 21:10:21 UTC 2018 || u'Equipment Mode Object': Production [PRODUCTION] || u'Mode Duration': 72.11666666666666 || |
Sepasoft MES Module Suite