LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you document specific sections of a VI?

Once in a while I'll use a VI (perhaps one of mine or one from vi.lib) to do something in an unusual way.  How would you document this usage so that when you go back to it some weeks later you don't have to scratch your head wondering why you did it that way?  A free label near that VI (or wire) clutters the diagram and gets lost when doing a diagram cleanup (ctrl-U).

 

I can think of a couple of ways that NI could help us out.  One would be to allow me to attach a documentation property to an instance of a VI or wire.  This documentation would show up as either a tool tip when you hover the mouse over the object, or in the Context Help window.  An indicator would be needed on the VI or wire to let me know that there is documentation available.  The indicator may be something that resembles a coersion dot though in a different location so it won't be confused as a coersion dot.

 

On a related note, I've seen a few diagrams that have transparent labels on top of a wire indicating what that wire does.  This is a pretty good kludge to document a wire.  Perhaps a label property can be attached to the wire in much the same way as the documentation property I describe above.  The label would be visible and automatically displayed on top of the wire.  The key difference is that the label would be owned by the wire and could not get misplaced.

 

 - les

 

0 Kudos
Message 1 of 8
(3,361 Views)

The last month's or so there was a thread about this topic, so you might consider searching around the forum.

If I remember correctly, one of the ideas was to type-cast the wire with a constant of the same type, but which has a discription set. The type cast woul tell you, that there is documentation available, which will be shown in the tip strip of the wire.

 

Felix

 

PS: I think one of the topics discussed in the thread was how to have meaningful names when using dynamic event registration in a (reusable) SubVi.

Message 2 of 8
(3,360 Views)

Adding to Felix's excellent suggestion...

 

You can also define documentation for your wires if you want that show up the help when flaoting with the wiring tool.

 

 

Ben

Message Edited by Ben on 09-22-2008 07:40 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 8
(3,355 Views)

You can already add documentation to any instance of any node on the diagram, but it just does not show in the CH window.

 

If you want, you can do something like what I described here, but that also won't help you with the auto cleanup. Personally, I just prefer a free label and not to use auto cleanup at that point.


___________________
Try to take over the world!
Message 4 of 8
(3,346 Views)

I like the way NI documents code in some of their examples.  They use small labels with a number or letter in it.  Then below is a huge label with explanations of each numer of letter.  See the picture:

 

Message Edited by tbob on 09-23-2008 12:27 PM
- tbob

Inventor of the WORM Global
Message 5 of 8
(3,307 Views)

tbob wrote:

I like the way NI documents code in some of their examples....


Smiley Surprised 

Pssst, tbob. Your text programmer side is showing. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 8
(3,295 Views)

les,

 

Another possibility for the unusual use of a VI  is to enclose it in a wrapper VI.  The wrapper would have the same connector pane and would contain only the original VI. You could than modify the icon and documentation any way appropriate for your application.

 

Lynn 

0 Kudos
Message 7 of 8
(3,258 Views)

Ben:

 

Smiley SurprisedSometimes it is just hard to completely let go of 20 years of text programming.  This may sound crazy but I miss the UNIX command line and I still like programming in VB.  Of course LV is by far my favorite.Smiley Tongue

 

To make this related to the original post, I admire anyone who makes an extra effort to document their VI so that it is self explanatory.  I wish everyone would do this.

 

tBob

- tbob

Inventor of the WORM Global
0 Kudos
Message 8 of 8
(3,237 Views)