Frank Posted May 24, 2004 Report Share Posted May 24, 2004 In text based languages like c it is possible to comment out code so that it does not execute. This would be a box on the block diagram, like a case structure that code could be placed inside and it would not execute or compile. A program would run if broken code were inside the comment box and operations like control B would not affect it. Code could be cut and pasted to and from the comment box. It would be different from a case structure in that broken code inside the comment box would not prevent the program from running. Quote Link to comment
Michael Aivaliotis Posted June 6, 2004 Report Share Posted June 6, 2004 Actually, this is already available however it has only been released for the LabVIEW PDA module and the LabVIEW FPGA module. I'm not sure why it has not been released to the windows platform. I have attached a VI with this structure. You should only use it if you are running PDA or FPGA module since it is NOT a supported feature for other platforms. Use at your own risk! Download File:post-14-1086500298.vi Quote Link to comment
Mike Ashe Posted September 23, 2004 Report Share Posted September 23, 2004 I have seen and tried to use this before. Sometimes it worked fine and in other areas it did not let me run my code. I had a snippet of code that I wanted to comment out, and the coditional worked fine for that. When I commented out a non-executable VI, the diagram looked like it compiled (good run arrow) but I could not run the VI, it errored on execution. Too bad, since this would be a very good feature to have to share sections of the same VI that is being worked on by more than one person. Mike Quote Link to comment
Jim Kring Posted September 25, 2004 Report Share Posted September 25, 2004 I have seen and tried to use this before. Sometimes it worked fine and in other areas it did not let me run my code. I had a snippet of code that I wanted to comment out, and the coditional worked fine for that. When I commented out a non-executable VI, the diagram looked like it compiled (good run arrow) but I could not run the VI, it errored on execution. Too bad, since this would be a very good feature to have to share sections of the same VI that is being worked on by more than one person. Mike 1935[/snapback] I have heard that the "Conditional Disable Structure" does not work for blocks of code that call subVIs. Maybe this is why you ran into problems, on occasion. Quote Link to comment
m3nth Posted September 25, 2004 Report Share Posted September 25, 2004 I have heard that the "Conditional Disable Structure" does not work for blocks of code that call subVIs. Maybe this is why you ran into problems, on occasion. 1989[/snapback] This is correct. The program won't compile if there is an uncompileable subVI listed in the Disable structure. Since LabVIEW partially doesn't 'see' the subVI though, there are no errors in the error box that comes up when you try and run... just a blank box and a broken arrow until you remove the offending subVI or get it working so it can be compiled. Otherwise, you can place all the non-compileable code you want in a Disable structure and the program will run, just so long as it doesn't contain non-working subVI's. Quote Link to comment
Mike Ashe Posted December 26, 2004 Report Share Posted December 26, 2004 Commenting out non-working subVIs (and whole trees below them) is exactly what we sometimes need during development of large projects. It would also be nice if we had a Find/Enumerate option that would show us all the places that had Comment Blocks and manage them selectively or as a whole. Hmm, maybe some of the new scripting stuff... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.