Parsing data and output to a OPC item dependent upon a field value

Started by jeremy, January 23, 2020, 11:00:00 AM

Previous topic - Next topic

jeremy

Hi I have a data string of the format

$header, value of interest, item code <cr><lf>

the item code denotes which item I want to assign the value to in an opc server e.g if the item code 1 the value is fuel used, if it is 2 the value corresponds to distance travelled, if it is 3 the value corresponds to wind speed. All messsage headers are the same.

What is the easiest way of doing this?


Arthur Grasin

1. Extract items VALUE and CODE using the ASCII Data Parser
2. Copy VALUE to a new item (with necessary name) using a small script in the the Script Execute plugin.
If you like my work, please take a few seconds and add feedback about our site or our software [here]