AGG Software Forums
November 27, 2024, 10:08:38 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
   Home   Help Search Login Register  

Pages: [1]
  Print  
Author Topic: Parsing data and output to a OPC item dependent upon a field value  (Read 24806 times)
jeremy
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« on: January 23, 2020, 02:00:00 PM »

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?

Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #1 on: June 14, 2012, 08:25:33 AM »

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.
Logged
jeremy
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« Reply #2 on: June 14, 2012, 09:28:37 AM »

Thank you for your help.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines