Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Write and termination

I am using a modified version of the Basic Serial Write and Read VI from
National Instruments\LabVIEW 7.1\examples\instr\smplserl.llb
and I have been attempting to write a command and receive a response using RTS/CTS flow control. Every time the program reaches the VISA Write VI, it waits until the timeout and returns no data. Could this be a termination error? Should I use Wait On Event and associated VIs in place or possibly in conjunction with flow control? The error received is just a general “operation was not completed before timeout was reached” kind of error. Any general notes on writing a string command would be much appreciated.
0 Kudos
Message 1 of 2
(2,726 Views)
You're getting a timeout error on the VISA Write? If that's the case, the instrument might not be actually set up for handshaking or maybe there's a problem with the cable. Have you tried using Hyperterminal to communicate? If you get a timeout error on VISA Read, then there's a lot of possibilities. You perhaps are not sending a termination character with your write and the instrument doesn't receive a valid command to send data. Or the comm parameters are incorrect. Or the cable is bad. Or you've set VISA Read to expect a termination character and the instrument doesn't send one. In any case, I always recomend trying communication in Hyperterminal or something similar before writing any LabVIEW code. Getting serial communication to work is hard enough without having to throw in new code.
Message 2 of 2
(2,712 Views)