LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access VI where errorexception is thrown

Hello everyone,

 

I am trying to follow an LV generated error (error_out cluster). My master machine gets the bundled errors of all slaves and displays the errors on the main UI. Looking at the errorcode I can identify the statemachine. The error happens in daqmx-start (-50103: DAQmx-start.vi:722003). I set probes at every case I use the it but the error is never thrown.

 

Is it possible to follow the error to its caller, since I am not always aware which VI labview calls when I am using the native VIs?

0 Kudos
Message 1 of 5
(2,255 Views)

@s.h._tech wrote:

Is it possible to follow the error to its caller, since I am not always aware which VI labview calls when I am using the native VIs?


No. You'd have to manually trace it back to the source.

 

I'd be surprised if the DAQmx-start.vi didn't include a full call chain. That call chain is your trace.

 

The reason you don't see an error when you open the VI could be because it's a clone... So opening the VI opens not the clone but the original, that probably doesn't even run.

0 Kudos
Message 2 of 5
(2,227 Views)

I found the error caller, but I had to follow every instance it might call as stated above.

0 Kudos
Message 3 of 5
(2,219 Views)

@s.h._tech wrote:

I found the error caller, but I had to follow every instance it might call as stated above.


That is the consequence of choices that where made...

 

Is your problem solved? It would be hard to give further advice without knowing more about (or seeing) the code.

0 Kudos
Message 4 of 5
(2,210 Views)

You need to write an Error Handler that "traps" the Errors in the Slaves and "does something sensible" with it.  Suppose you want the Slave to exit (quit), but to notify the Master that it has failed (probably a good thing to do!).  Your Error Handler could look like the following:

  • Start by copying the Error (branch the Error Line).
  • Clear the Error (so the Slave will continue to work)
  • Compose a "Message" to the Master (I'm assuming you are using a Message-passing protocol, something like a QMH) saying, in effect, "Slave #N exited with Error XXXX and Call Chain YYYY".
  • Go to the Slave's Exit routine and exit.

Bob Schor

0 Kudos
Message 5 of 5
(2,197 Views)