LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Commenting out code?

In traditional text programming, commenting out segments of code for debugging purposes is commonly done.
 
I was just wondering there is an equivalent option in LabVIEW?  Currently, if I want to "comment out" code, I just put a case structure around the code I want to comment out, wire a false constant to the case structure, and re-route any dataflow wires (if they exist, which hopefully they do, otherwise you probably have a race condition).
Is there a function in LV that lets you highlight and ?ignore" or comment out a portion of code?
 
BTW, I'm using v 7.1.
 
Thanks in advance!
Message 1 of 12
(14,570 Views)

You need LabVIEW 8.0.

Look for the "Diagram Disable" structure. 😉

Message 2 of 12
(14,561 Views)
Ah, another reason to upgrade, thanks for the info! Smiley Tongue
0 Kudos
Message 3 of 12
(14,559 Views)
As you can see the VI is not broken, yet the code in the diagram disable structure is a total mess. 😄
 

Message Edited by altenbach on 07-27-2006 04:09 PM

Message 4 of 12
(14,557 Views)

By the way - this topic has been discussed already several times.

In reply 8 of this thread http://forums.ni.com/ni/board/message?board.id=170&message.id=138019 is already the announcement of the diagram disable structure for LV8.0

Always search the forum first. Most of the time any topic has been discussed before.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 12
(14,543 Views)
Yeah, I searched first, and saw that topic.  How can you not search, if they "force you to do it if you want to post a new topic 😉
 
I read the first few posts, and it seemed that the solution was to use a case structure with a false terminal wired to it.  This was already my aforementioned solution (I posted this in bold).  Then they mentioned something about LV PDA, which then at this point I stopped reading.  Looking at the topic more closely, they do mention LV 8, but got I confused.  In retrospect, I could have posted my question in that particular topic, but it didn't seem right to "bump" a year old thread.
 
Just my opinion, as I feel what I did was correct.
Message 6 of 12
(14,520 Views)
I think the point of confusion is that the code disable structure and the conditional compilation node (not 100% sure what we call them in the product) were in the palettes for the PDA module back in 7.1.  In 8.0 they were introduced to the standard LabVIEW software.

J
Jason King
LabVIEW R&D
National Instruments
Message 7 of 12
(14,495 Views)
Hello Agill,

you should have done?

Why, not because I am really upset by the number of discussions. But because the forums work in a way that ANY new message hits the forums at the top, and most likely will generate some interest. And it shows the die hard users that you DID search!

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 8 of 12
(14,490 Views)


@TonP wrote:
Hello Agill,

you should have done?

Why, not because I am really upset by the number of discussions. But because the forums work in a way that ANY new message hits the forums at the top, and most likely will generate some interest. And it shows the die hard users that you DID search!

Ton



Eh, that's your opinion.Smiley Indifferent

While reading that topic, I got confused on what the discussion was about.  By "bumping" that topic, I felt that my question would be out of place, as the topic seemed to be leaning toward LV PDA.  The only mistake I felt I did was not reading that topic closely enough (as it confused men), but HEY, at least I read it.  In terms of proving that I searched, I felt that my bolded statement is evidence enough that I searched.  Why would I bold it in the first place?

Message 9 of 12
(14,483 Views)

Hi agill

Nothing's wrong with your behaviour. It's just a very very well known way, that very often questions are posted, which have been answered several times before.

Ok - sometimes it's also hard to find a discussion, but at least one should give it a try. And about posting to an old thread - you absolutely can do this, maybe it takes a little longer until you get an answer.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 10 of 12
(14,439 Views)