Before I explain the “problem” first a bit of background. I’m totally new to the Unitronics products but It seems to be a very usefull product range.
I have downloaded Visilogic and played with it a bit. Programming the instructions and functions doesn’t seem to be a problem. I have programming experience so I think I will manage that.
The major problem for me is the RS232 data communication with an external data acquisition system. I have the protocol of the unit but I don’t know how I can implement it in the Visilogic software to use it in my program.
I already have tried the communication init function and the FB protocol configuration but it’s not clear to me how I need to configure them. I’m not even sure that it is the right way to do it! I hope someone here can help me out.
The communication protocol is as below:
Communication protocol:
· Send out STX to activate a 12-channel measurement and get the response in the following structure:
· The first six ASCII characters contain the data from the first channel in the format:
Sign, H, T, O, D, Tab (sign, hundreds, tens, ones, first decimal, tab)<br style=""> <br style="">
· The second six ASCII characters contain the data from the second channel in the format:
Sign, H, T, O, D, Tab
.
.
· The twelfth six ASCII characters contain the data from the twelfth channel in the format:
Sign, H, T, O, D, EOT
Sign, Hundreds, Tens, Ones, Decimal refer to mV
Example: 2D, 37, 34, 30, 38, 09 means -740.8 mV of the first channel
I need decimal values as a parameter in the software so I can use them in calculations. Anyone which can help me with it?
Thanks in advance.