05-27-2011 03:04 PM
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
05-31-2011 06:19 PM
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.
01-03-2012 01:39 PM
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.
01-04-2012 11:30 AM