LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView VISA read unfunctionality.

My problem is concerning the LabView VISA read unfunctionality. Our device is GBIP-communicating. VISA write commands are sent OK but when you send a query remote command the command is going OK to our device UI but when it has to read from the buffer it gets a time-out error. I have programmed with C and C++ style and in all of those VISA read works fine. With HP Vee there's no problem. I have done a VISA driver and that works too but LabView viRead doesn't. I have put delay after reading, but it didn't work. Is it doing somehow with the attributes settings ?
Have you any example how is it done in LabView ?
I have those attributes set in C code so I know what values I put but how, I don't know.
I have used several
examples (ex. Easy VISA Write & Read.vi) and the write commands
are going OK but the read not.

Thankfull of any kind of help.
Markku Rankinen
0 Kudos
Message 1 of 4
(3,194 Views)
The only thing that comes to my mind is something that happened me in the first LabVIEW VISA sessions. I was telling VISA to read, but there was nothing to read. If you write a command and that command makes your instrument to answer, then after the write vi you must put a read vi with a proper byte count (depending on the info you expect). If you write a command and the instrument doesen't answer (even after doing some action) and you put a read vi, this will timeout. Last, be sure you wire the proper byte count, else, you won't empty the buffer, and some data might be lost.
Hope this helps.
0 Kudos
Message 2 of 4
(3,194 Views)
You can set the timeout value (default 10 seconds) with a visa attribute node.
just before the read or immediately after an open visa. Set the timeout to an appropriate value. Also if the bytecount is too high and no correct end is signaled (EOI or endchar) it could timeout. But this is the same for VEE and LabVIEW.
greetings from the Netherlands
0 Kudos
Message 3 of 4
(3,194 Views)
Markku:

You may want to toggle between asynchronous and synchronous VISA reads. In LabVIEW 5x it is in the ini file; in 6i and higher it is per-node.

Also, you may want to use NI Spy to capture the offending calls. You can send a log file to NI technical support staff if you still can't figure out the error.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
Message 4 of 4
(3,194 Views)