Get Messages by Unit Path

Sepasoft MES Module Suite

Get Messages by Unit Path

The use-case for this script function is when an operator oversees multiple Units that can be running various batch recipes. It will return all messages for Batch Recipes that are active for the specified Unit(s).

Python
msgList = system.mes.batch.queue.getMessages('Enterprise\Site\Area\Process Cell\Unit ?')
for m in msgList:
	print(m)

The unit path can contain * for multiple character wildcard or ? for single character wildcard.
The unit path can contain multiple paths.

For example: 'Enterprise\Site\Area\Process Cell\Unit 1, Enterprise\Site\Area\Process Cell\Unit 2'

Get Messages by Batch Recipe

The use case for this script function is when an operator oversees or is just interested in viewing messages for a single batch recipe at a time. It will return all the messages for a single Batch Recipe that is active.

Python
qList = system.mes.batch.queue.getEntries(0, 1000, '')
for q in qList:
	msgList = system.mes.batch.queue.getMessages(q)
	for m in msgList:
		print(m)

Acknowledge a Message

Python
qList = system.mes.batch.queue.getEntries(0, 1000, '')
for q in qList:
	msgList = system.mes.batch.queue.getMessages(q)
	for m in msgList:
		if m.getStepName() == 'O6' and not m.hasAckBy():
			m.setAckBy('Tom')
			system.mes.batch.queue.acknowledgeMessage(m)
			break

It is not required that all messages be acknowledged. If the Requires Acknowledgement parameter is set to False, then the following Transition controls the flow to the next step.

If the Requires Acknowledgement parameter is set to True, then the User Message Phase State runs until the message is acknowledged. A User Prompt Phase and the State runs and automatically is acknowledged when the user enters a value.

Sepasoft MES Module Suite