10-20-2005 11:33 AM
10-20-2005 11:20 PM - edited 10-20-2005 11:20 PM
Use simply the recommandations given in the RTE manual. You don't have to convert to binary : that's something done by the hardware.
For instance, to send the temperature setpoint to the controler, you have to send a byte string such as
CA 00 01 F0 02 01 2C DD, where CA 00 01 is a header specific to the type of serial link you are using,
F0 is the set temperature command,
02 is the number of bytes expressing the temperature that you are about to send
01 0C is the temperature in tenths of degree (here : 30°C = 300 tenth = 010C$
DD is a check sum byte.
The corresponding labVIEW program is as follow :

Of course, do not forget to initialize the serial port before writing the string !
Message Edité par chilly charly le 10-21-2005 06:21 AM
10-21-2005 09:29 PM
10-21-2005 09:48 PM
Sovan a écrit:
2> I was trying to write a .vi by copying your block diagram. I am not able to get to some steps and they are:
(a) what are the elements inside the "array constant" function and how do I choose them? I guess same for elements with "xCA" and
"xFF" that are input to second "build array" and "XOR", function respectivelty.
(b) what is the icon before first "build array" function and how do I get it?
(c) did you choose "string to byte" converter just below "command string"?
(d) how do I initialize the serial port?
a/ The array constant contains hexadecimal values. That's why there is a small blue x before the numbers. Right click the constant, go to Representation then select U8; then Right click again, goto Representation and select hexadecimal.
b/ It's a Split Number function, that returns the low and high order bytes, in the Advanced > Data Manipulation sub-palette
c/ just the reverse : it's a byte array to string converter
d/ Use the VISA Configure Serial Port vi. See the Help files and the examples in the LabVIEW folder (in LabVIEW x.x/Examples/instr/smplserl).
10-21-2005 09:50 PM