LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comenting code - style - how to keep coments where you want them - without using sequences

Solved!
Go to solution

Silly question maybe about style of commenting.

 

Basically i like to use sequence boxes to keep comments on my diagram beside the bits of code that they refere to - otherwise when you use diagram cleanup (which i'm afraid i use all the time) they go anywhere.  This is good - except that i found especially when doing FPGA programming the sequence boxes reduce the amount of parralelism that can go on - since the 'box' needs to finish before any of the outputs can be used.  Is there some other method i should be using instead of sequence boxes to keep text beside elements - without enforcing that a set of elements are fixed in one place?

0 Kudos
Message 1 of 5
(2,245 Views)
Learn to create code properly the first time o so you don't have to use block diagram cleanup as a crutch.
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 5
(2,228 Views)

I usually use labels of structures (loops, cases, etc) and labels of diagram constants, etc. for comments. In newer versions, we also have wire labels.

 

(see also)

 

What is your LabVIEW version? Also the LabVIEW 2011 cleanup does a better job keeping diagram comments together with the related code compared to earlier version.

Message 3 of 5
(2,219 Views)
Solution
Accepted by topic author wideofthemark

You might want to vote for this idea. The flat frame decoration under the structures pallet is better for highlighting a section of code than a sequence structure. Of course it won't enclose the code and the bd cleanup will mess you up. I personally don't use bd cleanup often but when I do it is only to clean up a selection. Never the whole thing otherwise I have more work to do.

 

I am pretty OCD about bd neatness but recently I have started to just not worry about it very much until the VI is almost done. Only then do I make sure there are no one pixel wire bends, subVIs are aligned and spaced perfectly, and comment boxes are in the correct location.

=====================
LabVIEW 2012


Message 4 of 5
(2,185 Views)

Thanks for all the answers.  I guess that what i was hoping existed doesn't exist as yet.

 

Thanks though for pointing me towards the idea exchange thing - looks to me like something like this http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Advanced-Code-Commenting-Functionality/idi-p/1452396 is pretty much what I would like. 

 

Hopefully NI will look at it for releases soon(?)

 

Untill i does I guess i shall keep using the sequence\label methods, and happily hitting cleanup as often as I can.  Us cripples need our crutches!

 

0 Kudos
Message 5 of 5
(2,170 Views)