Skip to end of metadata
Go to start of metadata

Overview

Show case using system.mes.getEquipmentStateOptions()

Applies To and Version Info

MES 2.0

Details

Script to be run in Script Console.
replace things in <> to match your Equipment (eqPath=<>) or the Class(es) you want to scan..

Screenshots

Scripting

The general syntax of the script function.

eqPath = '[global]\<Enterprise>\Site>\<Area>\<Line>'
parentUUID = ''

data = system.mes.getEquipmentStateOptions(eqPath, parentUUID, "")
print "\n------------------ first pass NO parentUUID Filter ------------------\n"
for item in data:
	stateName= item.getName()
	UUID = item.getUUID()
	print "UUID [%s] | stateName [%s] | getParentCollection [%s]" % (UUID, stateName, item.getParentCollection())
	#extract UUID for Class I want ?	
	if 'FirstClass' in stateName:
		parentUUID = UUID
	
data = system.mes.getEquipmentStateOptions(eqPath, parentUUID, "")
print "\n------------------ Second parentUUID Filter on Top Class ------------------\n"
for item in data:
	stateName= item.getName()
	UUID = item.getUUID()
	print "UUID [%s] | stateName [%s] | getParentCollection [%s]" % (UUID, stateName, item.getParentCollection())
	#extract UUID for next Class I want ?	
	if 'NextSubClass' in stateName:
		parentUUID = UUID

data = system.mes.getEquipmentStateOptions(eqPath, parentUUID, "")
print "\n------------------ Third parentUUID Filter on Sub Class ------------------\n"
for item in data:
	stateName= item.getName()
	UUID = item.getUUID()
	print "UUID [%s] | stateName [%s] | getParentCollection [%s]" % (UUID, stateName, item.getParentCollection())	

References

system.mes.getEquipmentStateOptions


Keywords

OEE, Core

Configuration, Equipment State, system.mes.getEquipmentStateOptions



  • No labels