LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1073807313 occurred at VISA Read?

Hello-

 

When doing LV code, I try to understand and "take care of" any errors that pop up.  In this case, I have a serial port (COM1) wired to the console of an ElectroMed CPX-160 Xray generator.

 

This console continuously sends out packets of data with each packet containing details of generator status and settings.  The section of code dealing with this stream runs in its own while-loop and the VISA serial buffer has been set to 4K.  It's only 9600 baud and LV "should" be able to keep up.

 

For the most part, it does.  Casual testing showed that the console spits out the occasional framing error and so that's tested for and selectively ignored. 

 

-----

 

Now comes time to finish up.  There's an "END" button on the front panel and that signal eventually gets to the loop control.  If "end" is clicked on, then the loop about the event structure terminates.

 

The loop around the VISA Read will terminate (local variable on END).

 

However, THIS error shows up:    Error -1073807313 occurred at VISA Read in Afterglow5.vi

The explanation offered is:

 

     VISA:  (Hex 0xBFFF002F) You must be enabled for events of the specified type in order to receive them.

 

Uh, which type of event deals with this?

 

A different while loop about an event structure handles controls on the front panel.  One event triggers on clicking "end" and the loop around the event handler terminates.  But the loop around VISA Read is in a different loop.

 

So I am puzzled by this error.

 

Your time is appreciated.

 

Mark

 

0 Kudos
Message 1 of 4
(8,016 Views)

Hi Mark,

 

Is your code very large? Could you post it to the discussion forum so we can see the error?  Also, there is a great example in the LabVIEW Example Finder that goes over the Serial Break Events that the error seems to be referencing.  You can find the example by going to LabVIEW and then Help>>Find Examples... From there, search for "Serial" and open the Detect Break Event.VI.  It is possible that you did not enable the event that you are trying to call.  I hope this helps!

 

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(7,989 Views)

I'm getting the same error from a VISA Read.  The VISA interaction is very simple.  I do a serial configure, then five reads every second from the device.  It will run fine for hours or days then throw this error, then throw a bunch of timeout errors, then hang.  I'm not using VISA events at all.  What else might cause this error to show up?  I've seen several other posts throughout the years with this same problem, but no resolutions.

Robert Mortensen
CLA, CLED, LabVIEW Champion, Principal Systems Engineer, Testeract
0 Kudos
Message 3 of 4
(7,926 Views)
I must have stared at this problem for a couple of days before throwing in the towel. As this error only appears when the monitoring loop terminates, I put a Clear Error block there and just kept going. Not an optimal solution... but this is buried somewhere in DAQmx (I think) and I was running out of time. The other "drive the engineer crazy" problem was comm errors. With the system idle and only monitoring the port, there was a 5% error rate. Framing, parity, overrun, *something* would go wrong 5% of the time. My solution: check the errors and ignore them. The problem was indicative of something not being able to keep up.. but 4K buffers at 9600 baud? Packets are a maximum of 50 bytes. I haven't tried queuing packets for processing.
0 Kudos
Message 4 of 4
(7,908 Views)