LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Emulate "break on library error"? Terminate execution?

I'm interested in the ability to halt program execution when I detect my own error. The only means I've been able to find is a simple call to exit(), but what I would rather do, assuming the program is running in Debug mode, is to emulate the "Terminate Execution" button (the stop sign). Then I can quickly debug the problem.

My current system is to open a popup panel when a fatal error is caught. I then switch back to LabWindows, click the "Terminate Execution" button, then the "Finish Function" button, then switch back to the UI to close the popup panel, and I'm finally in a state where I can debug the problem.

Are there any library functions that provide this functionality? NI's own libraries do this all the time but I'm not sure how.


Thanks
Randy

0 Kudos
Message 1 of 3
(2,947 Views)
Check out the Breakpoint() function.  It causes CVI to break execution into the debugger.  You can pop up your error dialog, then right after that function returns, call Breakpoint.

Hope this helps.

Mert A.
National Instruments
Message 2 of 3
(2,947 Views)

@Mert A. wrote:
Check out the Breakpoint() function.  It causes CVI to break execution into the debugger.  You can pop up your error dialog, then right after that function returns, call Breakpoint.



That's exactly what I'm looking for.


Thanks!
0 Kudos
Message 3 of 3
(2,941 Views)