ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I fix a VISA Read error?

I am tryinging to hook up my radiometer to the computer so I can dump all the data it collects into Excel.  I have Windows XP (32 bit) and LabVIEW 8.5.1 and I just received this LabVIEW VI from the company that made the radiometer.  I keep getting the same error message everytime I try to run the VI. 

 

Error -1073807339 occurred at VISA Read in ILT1700.vi

Possible reason(s):

VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.

 

I know I have the radiometer hooked up correctly and I am using the correct Comm Port.  Next I thought it might be a driver issue, so I downloaded the full NI-VISA 4.4.1 driver package.  Again I keep getting the same error message.  I get the same error message even when I disconnect the radiometer from the computer.  How do I get the the computer and the radiometer to communicate?

0 Kudos
Message 1 of 4
(3,226 Views)

Does the radiometer continually send out data, or do you have to send it a command code first?

 

Have you tried opening up a session of hyperterminal to see what if any data is coming in?

 

In your loop, it looks like you are reading continuously 1 byte at a time until the line feed character comes in.  You can enable the termination character of the serial port and set it for LF.  Then you can read a large number of bytes.  When the LF comes it, the VISA read will terminate itself and send the entire string on.  No looping would be necessary.

0 Kudos
Message 2 of 4
(3,221 Views)

The first question is how do you know that it is hooked up correctly? Can you read data with a program such as Hyperterminal?

 

Second, that program you posted is a mess.

0 Kudos
Message 3 of 4
(3,217 Views)
The default VISA timeout is 2 seconds, so your program is missing a byte and timing out.  You might want to log your serial port traffic to see the actual data coming through.  Portmon is a fantastic tool for debugging serial applications: http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx
Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,190 Views)