LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to control waterbath temp using labview via RS232

HI,
I am new to labview. I have labview 6.1. I need to control a thermo RTE7 water bath temp.  controler using labview.
The water bath has to be connected to computer via RS232 port and the commands have to be given via binary values.
The users manual for the bath has "hex" bytes that are to be converted to binary values to be passed to bath. If anyone has done this before or anyone can help me on this please let me know. Thanks,
0 Kudos
Message 1 of 5
(3,306 Views)

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

Chilly Charly    (aka CC)
Download All
Message 2 of 5
(3,281 Views)
Thank you very much chilly. Your help got me started. There are few more questions.

1> I could not open your .vi file because it was written in Labview 7.1 and I have a 6.1. Is it possible for you to get me a 6.1 version, if not then I will try to get an upgrade to 7.1.

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?

I guess that would be it for now. Thanks again.
0 Kudos
Message 3 of 5
(3,251 Views)


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).

Good wiring !
Chilly Charly    (aka CC)
Message 4 of 5
(3,244 Views)
.. and you should upgrade to 8.0. Forget 7.1 😉
Chilly Charly    (aka CC)
0 Kudos
Message 5 of 5
(3,241 Views)