Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa can't read

Hello,

 

I'm fairly new to LabView so please excuse me. I've recently downloaded a vi. for Tektronix TDS 210 oscilloscope. I'm having a -1073807339 error (Timeout expired before operation completed). I've tracked the error to the initialize part of the program. Looking further into the initialize program, it turns out that the problem is VISA read.

 

I've also used the loopback test and there is nothing wrong with the serial port itself. The port is a USB to Serial Port conversion, but the loopback test still came out successful with the Basic Visa Read and Write.vi. I've also made sure the Baud rate, Flow control, and Parity were aligned with the instrument itself. In addition, I made a simple program to see if the VISA read was indeed the problem. Again I got the same problem. Here are the pictures to my problem.

 

Thank you Very much for your help.

0 Kudos
Message 1 of 6
(4,071 Views)

In my opinion, a loopback test is pretty useless. It tells you nothing about the com parameters or whether you are using the correct type of cable. The VISA Read is almost certainly not the problem. The error can occur if the com settings are incorrect, if you are using a straight through cable instead of a null-modem cable (or vice versa), or if you are sending the wrong command string, or if you are sending the wrong termination character. By the very nature of serial communication (not LabVIEW), you can send complete garbage (including writing when no instrument is there), and you will not get an error on a write. Your simple example of a write and read is certainly wrong since it has no termination character at all.

 

0 Kudos
Message 2 of 6
(4,068 Views)

Hi

other things to check:

1) is the scope set to serial communication? Or is it on gpib or ethernet?

2)Do you have the right cable straight or swapped (1:1 or null modem)

try with hyperterminal because it can also be that the endcharacter is not correct.

And last but not least, is the driver also tested for serial communication (should be in the html)

greetings from the Netherlands
0 Kudos
Message 3 of 6
(4,066 Views)

Thank you for the reply,

 

So, from what I've gathered, the problem might reside in the cable itself? Someone told me that the USB to Serial cable may just be a transfer cable rather than a full conversion cable. Could that be the possibility?

0 Kudos
Message 4 of 6
(4,052 Views)

Also, I'll look into the character termination and apply it properly. Thank you for noting that.

0 Kudos
Message 5 of 6
(4,051 Views)

The cable in question is the one between your converter and the instrument. Some instruments require a straight-through (i.e. pin 2 on one end is wired to pin 2 at the other) or null modem (i.e. pin 2 connects to pin3).

0 Kudos
Message 6 of 6
(4,046 Views)