LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable internal error handling?

Highlighted

Hi all,

WindowsXP

LabVIEW 7.1

PCI-DIO96 cards

 

Problem - Some of the ports on the DIO cards are set up as mode 1 (handshaking).  I am using DAQmx Read (Digital U8 1 Chan 1Samp) to perform the data reads from our system.  Occaionally our operators turn off our box prior to stopping the program.  When this happens, the next read that is executed does not get the handshake back from our box and DAQmxRead throws an error after it times out.  For some reason, this locks up LabVIEW and we usually have to use Windows Task Manager to kill it.  I have tried to implement my own error handling that could work around this, but I cannot figure out how to disable the LabVIEW internal error handlers.

I thought I could use the VI Property Node set to disable Auto Error Handling, but as far as I can tell that only deals with the currently executing VI (not global).  Also tried adding "EnableAutomaticErrorHandling=False" to the LabVIEW.ini file but that did not work either.  Is the ini file fix version specific?  Or maybe I misunderstand what setting the value to False actually does.

 

Anyway, if possible, I need to stop all LabVIEW generated errors and take care of the errors myself.  Any ideas would be appreciated.

 

TIA

Charlie

0 Kudos
Message 1 of 5
(1,004 Views)
Highlighted

Will reply to myself.  This may help out someone else who runs into a similar problem.

 

Did some more research and found that the Automatic Error Handling Property is not available for polymorphic VIs.

 

DAQmx Read is polymorphic, so I am out of luck as far as turning off the auto error handling.

 

Time to rethink the solution.

 

Charlie

0 Kudos
Message 2 of 5
(982 Views)
Highlighted

You can simply go to Tools>Options>Block Diagram to disable automatic error handling for all VIs.

0 Kudos
Message 3 of 5
(979 Views)
Highlighted

You can also pass all errors generated through a shift register and creat a loop that can rest the error if one is generated. If you posted your code it would be easier to help.

Tim
GHSP
0 Kudos
Message 4 of 5
(969 Views)
Highlighted

Dennis & Tim - thanks for the replies.

 

Figured out a way to take care of the problem.

 

Tried the Tools>Options>Block Diagram solution with no luck.  It looks like (at least in version 7.1) the change only applies to new VIs, not existing ones.

 

Tried disabling automatic error handling dialogs - no luck.

 

Tried disabling debug - no luck.

 

Took a closer look at the error information and it turns out that the error was being generated by DAQmx Read but was being annunciated by DAQmx Stop Task.  I wrote a VI that captures the error info and stuck it in between Read & Stop.  After capturing the error I clear it before passing it on to Stop.  This takes care of the auto generated error.  May not be the most elegant solutioin, but it works.

0 Kudos
Message 5 of 5
(949 Views)