LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
m3chtroid

Pause Execution node

Status: Already Implemented

Already available with the 'Pause VI' method of the VI class.

When debugging a program, I'd love to have a node similar to the "abort vi" node that programmatically pauses execution instead of stops it completely.  You might say this is the place for a conditional breakpoint, but unless I create my own custom ones, it's hard to make something that breaks on, say, the third time an error of this type occurs.

 

I have places in the code where I throw an error that is fatal(-ish), but it isn't caught until much further downstream.  In order to find which of the many calling vis triggered this error, I have a few options:

 

1) I can list the call chain.  This works, but still takes until the point the error is caught by my error handler popup to actually list the full problem, and due to either programmer error or bad design, can sometimes be overwritten by other errors thrown and badly merged further down the line.

 

2)  I can delete the error wires throughout the program and ensure automatic error handling is enabled.  This pops up the problem immediately, but often I don't have enough context to know if the error is the one I'm trying to track down, and my only options are to continue or stop.

 

3) I can throw multiple conditional error probes or breakpoints throughout the program, which works, but both are ephemeral as most of the time they're cleared using the "delete all breakpoints" button, and probes are lost when you close the window.  I'd like a more permanent and preventative solution.

5 Comments
wiebe@CARYA
Knight of NI

If you enable scripting, there's a PauseVI method:

PauseVI.png

 

I don't see why such a node would be easier that a breakpoint. If you want to break at the 3rd iteration, put a breakpoint in a case structure, where you'd also put the method...

 

ASAIC, already implemented.

AristosQueue (NI)
NI Employee (retired)

m3chtroid: I believe the scripting method mentioned by Weibe is what you are asking for. Leaving the VI refnum input unwired makes the node act on the current VI. If this is what you are looking for, we will close this idea as already complete.

m3chtroid
Member

Oh, so there is!  I wasn't able to find it with a cursory google search, so I assumed it was a missing feature.  Thanks!

Darren
Proven Zealot
Status changed to: Already Implemented

Already available with the 'Pause VI' method of the VI class.

wiebe@CARYA
Knight of NI

>Oh, so there is!  I wasn't able to find it with a cursory google search, so I assumed it was a missing feature.  Thanks!

 

Use LabVIEW's class browser (ctrl+shift+B). If scripting is on, it will include all scripting properties and methods. It's a handy tool. Of course, you'll have to suspect a property or method...