Equipment Object Functions - MES Counter

Sepasoft MES Module Suite

Equipment Object Functions | MES Counters

The following functions are associated with the MES Counter Complex Property.


 

getCountKind()

Description

Gets the selected Kind property for this MES Counter Complex Property (Infeed, Outfeed, Reject, General) See actual return values below.

Syntax

getCountKind()

  • Parameters

None

  • Returns

 String countKind - The selected Kind property for this MES Counter Complex Property. Returns "OEE_INFEED", "OEE_OUTFEED", "OEE_REJECT" or "GENERAL".

  • Scope

All

Code Example
1
2
3
4
5
#Get the Kind value from the Material In counter
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getCountKind()
Output

OEE_INFEED

 

getCountMode()

Description

Gets the selected Mode ("Method") property for this MES Counter Complex Property (Roll Over, Actual, Positive Change). See actual return values below.

Syntax

getCountMode()

  • Parameters

None

  • Returns

 String countMode - The selected Mode ("Method") property for this MES Counter Complex Property. Returns "ACTUAL", "ROLL_OVER" or "POSITIVE_CHANGE".

  • Scope

All

Code Example
1
2
3
4
5
#Get the Method (Mode) value for the Material In counter
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getCountMode()
Output

POSITIVE_CHANGE

 

getCounterGroup()

Description

Gets the Group property set for this MES Counter Complex Property (user-entered String).

Syntax

getCounterGroup()

  • Parameters

None

  • Returns

 String counterGroup - The Group property set for this MES Counter Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Get the Group value for the Material In counter
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getCounterGroup()
Output

My Counter Group

 

getRollover()

Description

Gets the Rollover property for this MES Counter Complex Property (default value = 32768).

Syntax

getRollover()

  • Parameters

None

  • Returns

 Integer  countRollover - The Rollover property for this MES Counter Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Get the Roll Over value for the Material In counter
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getRollover()
Output

32768

 

getStoreRate()

Description

Gets the Store Rate property for this MES Counter Complex Property, in seconds (default value = 60).

Syntax

getStoreRate()

  • Parameters

None

  • Returns

 Integer counterStoreRate - The Store Rate property, in seconds.

  • Scope

All

Code Example
1
2
3
4
5
#Get the Store Rate value for the Material In counter
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getStoreRate()
Output

60

 

getTagPath()

Description

Gets the Tag Path assigned to this MES Counter Complex Property.

Syntax

getTagPath()

  • Parameters

None

  • Returns

 String tagPath - The Tag Path assigned to this MES Counter Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Get the Tag Path value for the Material In counter
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getTagPath()
Output

[default]New Enterprise/Site/Area/Test Line/Test Cell/Material_In_Tag_Path

 

hasTagPath()

Description

Returns True if there is a Tag Path property value assigned to this MES Counter Complex Property. Note: Use getTagPath() to retrieve the assigned Tag Path string.

Syntax

hasTagPath()

  • Parameters

None

  • Returns

 boolean hasTagPath - True if there is a Tag Path property value assigned to this MES Counter Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Verify the existence of a Tag Path value for the Material In counter
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.hasTagPath()
Output

True

 

setCountKind(countKind)

Description

Sets the Kind property for this MES Counter Complex Property (must be a String with "Infeed", "Outfeed", "Reject" or "General").

Syntax

setCountKind(countKind)

  • Parameters

String countKind - The Kind property to set for this MES Counter Complex Property. Note: The string required to set the Kind property is different than what will be returned in the .getCountKind method. Set one of the following strings, in any combination of upper or lower letter cases: "Infeed", "Outfeed", "Reject" or "General". The .getCountKind method will return "OEE_INFEED", "OEE_OUTFEED", "OEE_REJECT" or "GENERAL".

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
10
11
#Set the Material In counter Kind property to "INFEED"
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getCountKind()
counter_object.setCountKind('Infeed'#can also use 'infeed' or 'INFEED'
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getCountKind()
#Note that the returned string is different than the string required to be set
Output

GENERAL

OEE_INFEED

 

setCountMode(countMode)

Description

Sets the Mode ("Method") property for this MES Counter Complex Property. Note: The string required to set the Mode ("Method") property is different than what will be returned in the .getCountMode method. Set one of the following strings, in any combination of upper or lower letter cases: "Actual", "Roll Over" or "Positive Change". The .getCountMode method will return "ACTUAL", "ROLL_OVER" or "POSITIVE_CHANGE".

Syntax

setCountMode(countMode)

  • Parameters

String  countMode - The Mode ("Method") property to set for this MES Counter Complex Property.

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
10
#Set the Material In counter Mode (Method) property to "Positive Change"
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getCountMode()
counter_object.setCountMode('Positive Change')
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getCountMode()
Output

ACTUAL

POSITIVE_CHANGE

 

setCounterGroup(counterGroup)

Description

Sets the Group property for this MES Counter Complex Property. This is the counter group's name string.

Syntax

setCounterGroup(counterGroup)

  • Parameters

String  counterGroup - The Group property to set for this MES Counter Complex Property.

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
#Set the Material In counter Counter Group property to "My Counter Group"
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
counter_object.setCounterGroup('My Counter Group')
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getCounterGroup()
Output

My Counter Group

 

setRollover(rollover)

Description

Sets the Rollover property value for this MES Counter Complex Property (default value = 32768).

Syntax

setRollover(countRollover)

  • Parameters

Integer  countRollover - The Rollover value to set for this MES Counter Complex Property.

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
#Set the Material In counter Roll Over property to 65536
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
counter_object.setRollover(65536)
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getRollover()
Output

65536

 

setStoreRate(storeRate)

Description

Sets the Store Rate property value for this MES Counter Complex Property, in seconds (default value = 60).

Syntax

setStoreRate(storeRate)

  • Parameters

Integer storeRate - The Store Rate property value to set for this MES Counter Complex Property.

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
#Set the Material In counter Store Rate property to 30
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
counter_object.setStoreRate(30)
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getStoreRate()
Output

30

 

setTagPath(tagPath)

Description

Sets the Tag Path for this MES Counter Complex Property.

Syntax

setTagPath(tagPath)

  • Parameters

String tagPath - The Tag Path to set for this MES Counter Complex Property.

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
10
#Set the Material In counter Tag Path property to point at the "Material In Tag Path" tag
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
tag_path = "New Enterprise/Site/Area/Test Line/Test Cell/Material In Tag Path"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
counter_object.setTagPath(tag_path)
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
counter_object = cell_obj.getComplexProperty('Counter''Material In')
print counter_object.getTagPath()
Output

[default]New Enterprise/Site/Area/Test Line/Test Cell/Material In Tag Path

This object inherits the AbstractMESComplexProperty functions.

Sepasoft MES Module Suite