I need to use a small vbscript to move messages out of a changing string variable into elements of an array.
Some detailed background:
I am using: (For any body familiar with these types of software or these particular packages)
Think & Do from Phoenix Contact (a SCADA software package) where the HMI has the ability to use vbscript with the variables (tags) within Think & Do
An OPC Server built into Think & Do
Spectre Instruments Win911 - An alarming and notification software that can communicate through the OPC Software.
Win911 has an available Group Data Poke that allows messages from Win911 to be sent through OPC to the Think & Do tag database (variables)
In the event of multiple alarms within an alarm group, this string that is sent through OPC is updated with each alarm condition in a cycle.
I need to capture each of these alarm conditions into an array so that all of the conditions can be available to the operators.
Lets say that I have a string called LoopingMessage.
At some interval (and I can't base anything off of the interval because of the multiple pieces of software involved) the message may or may not change. The number of messages it loops through vary by the number of alarms and this number is unavailable to the script.
So for instance, say I have 4 alarm conditions that are being written to Looping Message:
Condition 1 - ALARM HIHI DATE TIME REFLUX UNIT DIFFERENTIAL PRESSURE
Condition 2 - ALARM LOLO DATE TIME REFLUX UNIT PRESSURE
Condition 3 - ALARM HI DATE TIME BOTTOM TEMPERATURE CONTROL
Condition 4 - ALARM LO DATE TIME PRESSURE CONTROL VALVE
I need to be able to catch each of these alarms into an array. When one of these alarm conditions resolve it will no longer be in the loop. If another alarm condition occurs it will be added to the loop. (The array will need to be redim as needed.) Order in the array is not important, as long as all active alarm conditions that are displayed in the changing string are captured and any that have resolved and are not in this changing string are not captured/retained.
For whatever reason, I can't seem to get my head wrapped around a place to even start for a solution. If anybody has any suggestion of where to start, that would be terrific. Then we can get some code up and take a look at this.
Thanks in advance.
Justin Wood
Some detailed background:
I am using: (For any body familiar with these types of software or these particular packages)
Think & Do from Phoenix Contact (a SCADA software package) where the HMI has the ability to use vbscript with the variables (tags) within Think & Do
An OPC Server built into Think & Do
Spectre Instruments Win911 - An alarming and notification software that can communicate through the OPC Software.
Win911 has an available Group Data Poke that allows messages from Win911 to be sent through OPC to the Think & Do tag database (variables)
In the event of multiple alarms within an alarm group, this string that is sent through OPC is updated with each alarm condition in a cycle.
I need to capture each of these alarm conditions into an array so that all of the conditions can be available to the operators.
Lets say that I have a string called LoopingMessage.
At some interval (and I can't base anything off of the interval because of the multiple pieces of software involved) the message may or may not change. The number of messages it loops through vary by the number of alarms and this number is unavailable to the script.
So for instance, say I have 4 alarm conditions that are being written to Looping Message:
Condition 1 - ALARM HIHI DATE TIME REFLUX UNIT DIFFERENTIAL PRESSURE
Condition 2 - ALARM LOLO DATE TIME REFLUX UNIT PRESSURE
Condition 3 - ALARM HI DATE TIME BOTTOM TEMPERATURE CONTROL
Condition 4 - ALARM LO DATE TIME PRESSURE CONTROL VALVE
I need to be able to catch each of these alarms into an array. When one of these alarm conditions resolve it will no longer be in the loop. If another alarm condition occurs it will be added to the loop. (The array will need to be redim as needed.) Order in the array is not important, as long as all active alarm conditions that are displayed in the changing string are captured and any that have resolved and are not in this changing string are not captured/retained.
For whatever reason, I can't seem to get my head wrapped around a place to even start for a solution. If anybody has any suggestion of where to start, that would be terrific. Then we can get some code up and take a look at this.
Thanks in advance.
Justin Wood