Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication on LabView 5.1

I have an old program running on LabView 5.1.  I want to add code to read a sensor over an RS-232 line.  The device is connected to Com1 on my computer.  Using Hyper-terminal I can communicate with the sensor device.  I set the device to 9600 baud, 8 - N - 1 and send the command "SEND" and it returns the information.  Going into the Labview 5.1 example serial communication VI if I send the "SEND" command, the program times out with no return characters.  How do I start to figure out what is happening?

 

Gary

0 Kudos
Message 1 of 5
(3,812 Views)
My guess is that you are not sending a termination character. Append a CR or LF to the command. You can use the constants on the string palette or if you right click on the string control/constant, select '\' Code Display and use either \r or \n
0 Kudos
Message 2 of 5
(3,801 Views)
I tried concatenating a CR onto the string but no difference in response.  I also tried concatenating a LF to the string but it still times out.
0 Kudos
Message 3 of 5
(3,796 Views)

Try appending both.

0 Kudos
Message 4 of 5
(3,793 Views)
That worked!!  Thank you so much.
0 Kudos
Message 5 of 5
(3,789 Views)