system.mes.getTagCollectorDeltaValue

Sepasoft MES Module Suite

system.mes.getTagCollectorDeltaValue(equipmentPath, collectorType, key, beginDateTime, endDateTime)

Return the different between the values specified by the beginDateTime and endDateTime. Only MES tag collectors that record numeric values support this functionality.

Warning

This script function works only with the Equipment Count tag collector type.

Syntax

system.mes.getTagCollectorDeltaValue(equipmentPath, collectorType, key, beginDateTime, endDateTime)

Parameters

String equipmentPath - The path from the production model to the desired equipment.

String collectorType - The name of the tag collector type.

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 beginDateTime - The starting date to include in the returned values. 

Date endDateTime - The ending date to include in the returned values.

Returns

Object deltaValue - The difference between the value at the endDateTime and the value at beginDateTime.

Scope

All

Code Examples

Python
#The following code will display the tag  collector delta value in a numeric label component
#Copy this code snippet to actionPerformed event handler of a button
 
eqPath = event.source.parent.getComponent('MES Object Selector').equipmentItemPath
collectorType = "Equipment Count"
key = "Material Out"
 
#Get the begin and end date from two Popup Calendar components
fromDate = event.source.parent.getComponent('Popup Calendar').date
toDate = event.source.parent.getComponent('Popup Calendar 1').date

value = system.mes.getTagCollectorDeltaValue(eqPath, collectorType, key, fromDate, toDate)

event.source.parent.getComponent('Numeric Label').value = value

Output

Code
 4

Sepasoft MES Module Suite