LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW .exe application producing no errors

Hello,

 

I have a program that, when run in the LabVIEW program, performs as expected and raises expected errors.

 

However, I have made this program into an .exe executable file, and it produces no errors whatsoever when I would expect it to (i.e. when the file path is changed while the program is running). It appears that the default is to produce no errors. Is there a way to enable errors for this executable file?

 

Thank you.

0 Kudos
Message 1 of 5
(3,051 Views)

I'm going to guess that you have "Automatic error handling" enabled in all of your VIs.

 

That means that when LabVIEW reaches the end of a series of VIs with error chains linked, the last one will throw an error.

 

However, this doesn't carry over to EXEs.  You have to manually handle the error.

 

See here for a basic description

 

The easiest (not the best!) way to handle this would just be to drop a "Simple error handler" VI at the end of every error chain.

Message 2 of 5
(3,044 Views)

Thank you for the help! Yes, "automatic error handling" is enabled on all VIs. 

 

When you say "at the end of every error chain", do you mean between each VI connected with the error out wire type? For example I have many VIs connected within a while loop, and if I put it at the very end I don't think it would produce the error properly.

0 Kudos
Message 3 of 5
(3,020 Views)

The way automatic error handling works is that if it is enabled in a VI, every node with an "Error out" terminal that isn't wired to anything effectively has an invisible error handling node on the end of it that displays an error popup, pauses execution, and shows the part of the block diagram that caused the error.

 

So you don't need an error handler between each VI.  Just find the end of any series of nodes connected with error wires and put the error handler VI there.

 

Remember that nearly all VIs do nothing if there's an error present on the "Error in" wire, so if you have 6 nodes in a row and the 3rd one generates an error, what will usually happen is that the nodes will work like this:  Run-Run-Error-Skip-Skip-Skip, and then at the end of the last skip it pops up the automated error window.

 

I can't comment specifically on your while loop without seeing it, but in general my process is that I put the error handling outside the while loop, and inside the while loop I use an OR node to stop the loop on either the standard completion condition or when an error occurs.

0 Kudos
Message 4 of 5
(3,010 Views)

I have an exe that runs with no errors.

 

 

Well, That is nice isn't it?

 

Oh, $hit, you want it to "Do" something else too.  

 

What did you want it to do, what is it not doing?


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 5
(3,006 Views)