LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
simplemaan

Breakpoint specific case

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

When executing a VI state machine, especially if it called through VI server (for example as a subpanel), it would be useful to be able to set a breakpoint that triggers only on a specific case in a case structure.

 

You can breakpoint the entire case structure, but then you have to respond to every case.

 

A variation would be to be able to break after N iterations of the case.

 

Please note:

 

1. A conditional probe on the wire driving the case structure is not the same.  For example in the subpanel case mentioned, the subVI and block diagram have to be closed for VI server to call the VI as a subpanel, so a breakpoint needs to be saved with the subVI when it is closed before being opened by calling code.

 

Please also reference this post: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Conditional-breakpoints/idi-p/1230659.  It was declined because the NI moderator pointed out that you can use a conditional probe (whereas the user requested a conditional breakpoint, not a probe) but again, for the use case I mentioned above, you would need actually need a breakpoint, not a probe.

 

2. You can code a test on a wire into the case structure, but this requires code modification (which defeats the point of breakpoints).

 

3. Though you can set a breakpoint inside the case, if multiple wires enter it, you have no guarantee that in the data flow execution, the wire or object you requested will be executed first and upstream of the path you are interested in.

 

 

 

2 Comments
GregR
Active Participant

Breakpoints for wires are triggered at the end of the source node not at the beginning of the destination node. So it doesn't matter which wire you set the breakpoint on, LabVIEW will stop before any of the values from the source are used in any other node. For your case this means that putting a breakpoint on any wire coming into a structure will break before any nodes in the structure execute.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.