I am trying to communcate with a Power supply via serial connection. The communcation works great in Hyperterminal and PuTTY but i cannot seem to get it to work in labview. It times out when I try to read the data.
The hyperterminal settings are all basic and it works fine
9600 baud rate
8 data bits
1 stop bit
no flow control
send "VOLT?" with CTRL+J for linefeed
retruns the voltage at the output of the UUT.
I am wondering if i am sending the command incorrectly in labview. Any help would be great. I have attached the VI, this is my first try at serial comms so it is pretty baisc and i am sure I am missing something
Solved! Go to Solution.
You aren't sending the linefeed. You are only sending "Volt?"
Right click on the string constant, make the display style visible, and make it show \codes display. Then enter \n at the end. Now you'll be sending VOLT? with the linefeed.
Also, remove the shift regsiters off the reference and error wires. (A single timeout error will keep your VI from executing again until you stop and restart the VI)
And put a VISA Close outside the loop.
To make sure that the program waits inbetween the read and the write put a flat sequence structure with the wait inbetween the visa functions. Like in the image I've attached.
Also right click the string constant and select "'\' codes display" then you can send the new line command with the '\n' string.
I've attached an image of the changes I made and the updated VI. Let me know if it works.