system.mes.oee.getOEEAllActiveSegments

Sepasoft MES Module Suite

Description

Returns MES object links for all of the active Response Segment objects that are currently running at the specified equipment.

Syntax

system.mes.oee.getOEEAllActiveSegments(equipmentPath)


  • Parameters

String equipmentPath - The equipment path to return the Response Segment objects for.

  • Returns

MESList<MESObjectLink> - A MESList containing a MESObjectLink object for each Response Segment object in the results.

  • Scope

All

Code Examples

Code Snippet

Code
#Following code snippet gets all active segments for Production line 4 and will abort them all.
#The segments could consist of Changover and Production segments
 
eqPath = '[global]\Enterprise\Site 1\Packaging\Line 4'
sl = system.mes.oee.getOEEAllActiveSegments(eqPath)

for seg in sl:	#Look at each MESObjectLink in the MES Object list
	print seg	#Name of the Response Segment
	objSeg = seg.getMESObject()	#seg is an MESObjectLink, objSeg is the actual MESObject
	print type(objSeg)	#helper function if you're not sure what type of object you are dealing with
 
	system.mes.abortSegment(objSeg)	#Abort all active segments on this line

Output

Code
PC_0001-Enterprise:Site 1:Packaging:Line 4
<type 'com.sepasoft.production.common.model.mesobject.objects.segment.MESResponseSegment'>

Sepasoft MES Module Suite