Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix VISA Read -1073807339 error?

You only have the \n on the command in the last frame. You should add it everywhere and then if you get the instrument error, single step through the program to determine where it occurs. Many instrument will stop processing commands once an error is detected and you would need to do an error query to clear it.
0 Kudos
Message 11 of 17
(1,531 Views)
I have been playing around with some of the example files that come with the driver and have noticed that I get a VISA Read error for all of the examples I have tried. Could this simply be a problem with VISA Read or perhaps my driver, though I just installed the driver recently?
0 Kudos
Message 12 of 17
(1,531 Views)

That's why I asked you at the beginning if you were able to run a basic query. So, now you are saying nothing works. Even though you only get an error on the read, your writes are almost certrainly failing as well.

 

I would suggest that you do some experiments in MAX to get a basic *IDN? query to work before you do anything with LabVIEW. Try different termination characters.

0 Kudos
Message 13 of 17
(1,526 Views)

I have added the \n everywhere and interetingly now I get some output for the "identification" in the front panel (which is simply the model number of the analyzer) and I monitored all the error outputs of the VISA Reads and received a warning from frame 0 (the identification frame) saying  "Warning 1073676294 occurred at VISA Read in 4294A Trace Data to File_Nika Revised2.vi

Possible reason(s): VISA:  (Hex 0x3FFF0006) The number of bytes transferred is equal to the requested input count. More data might be available."

But I still get the same readout error from all the other frames. Regardless, just the fact that I am getting output now is some progress. Thanks for the advice. If you have any more advice for getting rid of the error in the other frames please let me know. You have been a great help.

0 Kudos
Message 14 of 17
(1,523 Views)

You can ignore the warning.

 

Do you still get the error on the instrument? If so, you have to identify the source. Otherwise, there could be some other setup required before the instrument will return anything. sorry, I don't have the instrument so I am unable to test your code.

0 Kudos
Message 15 of 17
(1,520 Views)
I do get the error on the instrument so I will try your advice and send a very simply command and see if I still get an error. I'll let you know the result soon. Thanks again for your help.
0 Kudos
Message 16 of 17
(1,517 Views)

I tested each frame individually and realized that in some cases I was outputting too many bytes and in other cases too little. So I adjusted the values and the program works now! Thanks so much for all of your help. I would not have figured out how to fix this without you.

0 Kudos
Message 17 of 17
(1,508 Views)