Sepasoft MES Module Suite
system.mes.addTagCollectorValue
These script functions are used to record a single value for the MES tag collector. If a value has already been recorded for the same timestamp, an exception will be returned.
system.mes.addTagCollectorValue(equipmentPath, collectorType, key, value)
Record a single value for the MES tag collector at the current gateway time. If a value has already been recorded for the same timestamp, an exception will be returned.
Syntax
system.mes.addTagCollectorValue(equipmentPath, collectorType, key, value)
- Parameters
String equipmentPath - The path from the production model to the desired equipment.
String collectorType - The name of the tag collector type. See Tag Collector Types for more details.
String key - Where there are multiple instances of a tag collector type, this specifies which one to use. For example, there can be multiple MES counters for the "Equipment Count" tag collector type. If not needed, pass an empty string. In other words it is the name of the MES counter or the name of the Additional Factor.
Datatype value - The value to record to the MES tag collector.
- Returns
Nothing
- Scope
All
Python |
#The following script will add tag value 2 and then update subsequent tag collector entries to reflect the change in value due to the new entry. dateTime = system.date.now() equipmentPath = '[global]\Enterprise\San Marcos\MP Rotator\MP Rotator 1' collectorType = 'Equipment Mode' key = '' value = 4 #Maintenance updateFollowing = True system.mes.addTagCollectorValue(equipmentPath, collectorType, key, dateTime, value, updateFollowing) |
system.mes.addTagCollectorValue(equipmentPath, collectorType, key, dateTime, value)
Record a single value for the MES tag collector. If a value has already been recorded for the same timestamp, an exception will be returned. If dateTime is in the future, the current gateway time will be used instead.
Syntax
system.mes.addTagCollectorValue(equipmentPath, collectorType, key, dateTime, value)
- Parameters
String equipmentPath - The path from the production model to the desired equipment.
String collectorType - The name of the tag collector type. See Tag Collector Types for more details.
String key - Where there are multiple instances of a tag collector type, this specifies which one to use. For example, there can be multiple MES counters for the "Equipment Count" tag collector type. If not needed, pass an empty string. In other words it is the name of the MES counter or the name of the Additional Factor.
Date dateTime - The date to the value being added. If dateTime is in the future, the current gateway time will be used instead.
Datatype value - The value to record to the MES tag collector.
- Returns
Nothing
- Scope
All
Python |
#The following script will add tag value 2 and then update subsequent tag collector entries to reflect the change in value due to the new entry. dateTime = system.date.now() equipmentPath = '[global]\Enterprise\San Marcos\MP Rotator\MP Rotator 1' collectorType = 'Equipment Mode' key = '' value = 4 #Maintenance updateFollowing = True system.mes.addTagCollectorValue(equipmentPath, collectorType, key, dateTime, value, updateFollowing) |
system.mes.addTagCollectorValue(equipmentPath, collectorType, key, dateTime, value, updateFollowing)
(function available in 2.79.0 SP1 and 2.80.0 SP1 onward) Record a single value for the MES tag collector. For the tag collector types Equipment Count and Equipment Cycle Count, an option checkbox is provided to update all subsequent entries up to the present time to include the numeric change in value between the new entry and the entry previous to it. If a value has already been recorded for the same timestamp, an exception will be returned. If dateTime is in the future, the current gateway time will be used instead.
Syntax
system.mes.addTagCollectorValue(equipmentPath, collectorType, key, dateTime, value, updateFollowing)
- Parameters
String equipmentPath - The path from the production model to the desired equipment.
String collectorType - The name of the tag collector type. See Tag Collector Types for more details.
String key - Where there are multiple instances of a tag collector type, this specifies which one to use. For example, there can be multiple MES counters for the "Equipment Count" tag collector type. If not needed, pass an empty string. In other words it is the name of the MES counter or the name of the Additional Factor.
Date dateTime - The date to the value being added. If dateTime is in the future, the current gateway time will be used instead.
Datatype value - The value to record to the MES tag collector.
Boolean updateFollowing - (for tag collector types Equipment Count and Equipment Cycle Count) If True, all subsequent entries will be updated to reflect the change in value of the new entry. If False, subsequent entries will be not be updated.
- Returns
Nothing
- Scope
All
Python |
#The following script will add tag value 2 and then update subsequent tag collector entries to reflect the change in value due to the new entry. dateTime = system.date.now() equipmentPath = '[global]\Enterprise\San Marcos\MP Rotator\MP Rotator 1' collectorType = 'Equipment Mode' key = '' value = 4 #Maintenance updateFollowing = True system.mes.addTagCollectorValue(equipmentPath, collectorType, key, dateTime, value, updateFollowing) |
How Manually Adding a New Historical Tag Collector Value Affects an MES Counter
|
|
Sepasoft MES Module Suite