LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comment out some sections of Labview programs during debuging

In other programming such as VC or VB, we can always comment out some sections of our program so that the commented section are not executed during debuging. Is there any way to comment out some sections of Labview program during debugging?
0 Kudos
Message 1 of 7
(3,312 Views)
You can use a case structure to surround the section of the program you do not want to execute and then wire a false constant into the input so the case will never execute.
Message 2 of 7
(3,310 Views)


@YanWong wrote:
You can use a case structure to surround the section of the program you do not want to execute and then wire a false constant into the input so the case will never execute.





Just remember to encapsulate the code within the "TRUE" case, otherwise it will execute it in the "FALSE" case..

- just in case -

😉
Message 3 of 7
(3,296 Views)


@YanWong wrote:
You can use a case structure to surround the section of the program you do not want to execute and then wire a false constant into the input so the case will never execute.




Also remember that doing this will only work if the code you "commenting" out must be executable. A broken run arrow will still be there after you put it in the Case Structure. If you are trying to comment out some broken code, you're out of luck, at least now.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 4 of 7
(3,289 Views)
Thank you Ed,

This was a very important item to point out.

-JLV-
Message 5 of 7
(3,287 Views)
Add to that;

Bad dll calls that fail durring the load,
Or
An Event structure configure to lock FP until...

The attached illustrates this behaviour.

Hit "Stop" before "Stop2" and the code never stops!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 7
(3,256 Views)
Oh yes...

I've seen that before...

😉
Message 7 of 7
(3,246 Views)