Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Unreliable data grabing off the serial port

I have been having troulbe getting a consistant amount of data from my CI-500. I get nothing the first two times, I get one sample on the third. Then I get two samples on the fourth. And Finally I get only the Character S (which is the commmand to start) on the fifth. The cycyle then repeats. Only when it writes two samples does it actually turn off at the end like its supposed to. I think that somewhere the incorrect command is reaching the CI-500. However, all the commands in the LabVIEW portion are correct. However, I don't know how to determine what is actually being sent to the CI-5000. So I don't know if the a buffer is being corrupted or the like.
0 Kudos
Message 1 of 3
(3,151 Views)
I can't open your file since I don't have LV 6.1, but if you are using NI VISA, you should have NI SPY on your computer. Run NI SPY and then run your program. You should see all the VISA calls in the NI SPY window.

Rob
0 Kudos
Message 2 of 3
(3,151 Views)
Hello-

It appears that the VI is set to receive only one character. Try using a termination method:
-End of String (EOS) character. Try using a VISA property node to set the termination character to the last byte sent by the instrument for each transmission.
-count. Try doing a VISA read for a specific count of characters.

Another thing it to try is to set the read to be synchronous.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,151 Views)