Best Practice for Posting LabView VIs?

Following up on this thread, does NI have any comments on how to best share VI code and information?

It seems to me that the Jing Projectmentioned in that thread is a nice way to demonstrate a VI’s function, and images are a nice way to show what it all looks like… but what I am seeking is a way to show a VI and explain something about how it works.

I suppose that sharing a well-commented VI - by posting it CD Media perhaps? - is likely the best practice, but I’d like to hear from the community on this.

Don

Personally, I think a description of the code, commonly with an image is a good approach. If you want people to run it, then attach the VI. The VI may have dependencies, but often those are easy to stub out to focus on the question or issue. And in fact, that stubbing and prepping the code to submit will often add insight as to what the issue was in the first place and avoid the dreaded doh posts.

I haven’t had good experiences with movies of VIs. Maybe that will change.

Greg McKaskle

I have a feeling that some sort of looping movie is going to be a better option than a static picture for many FRC VIs. Specifically because I can’t think of a better option for displaying the frames of a case structure or stacked sequence. Your other options are separate pictures for each frame, or a handmade separate picture containing all the frames. Besides posting the VI itself, a movie seem the best option.

Of course, if you’re intending to post code for a complete robot and not a subVI or code fragment, then you should ZIP up or otherwise package the entire project and send that instead.

File -> Print -> VI Documentation -> then select Block Diagram + Hidden Frames + whatever other options you want.

Print it to an HTML file (mostly a set of links to PNG images) and then upload to ChiefDelphi. Hopefully we can get someone to allow .html extensions?

That prints all of the frames just fine but isn’t really super navigable.

Russ

I take it you mean a text description, explaining what I want to accomplish and how I did it - right?

My main interest is showing how stuff is configured behind the icon.

For example, I created a VI (see first post above for a link) that takes an analog 0-5v input, limits it and maps it to a curve (actually an interpolated curve based on a table), scales it and displays it. The idea is to show how an analog joystick input can be mapped to eliminate a victor dead zone while increasing responsiveness where it matters, all while ensuring PWM outputs between 0 and 254. (Yes, I know I can scale it and map it in one block, making the multiplication block redundant, but I wanted to show one step at a time)

I can print out the scaling and mapping block (one attachment), but how can I show the table (second attachment) that lives within it? That is what’s important, not the ‘outside’ view of the block.

This example is a trivial case - I think - and so one image shows the table. But what about when these blocks get a little bit ‘advanced’ - will I need to paste a half-dozen pictures to get my point across? How about when the code is for the whole robot?

Has anyone tried to open the VI that I posted? Can you see the table?

I think a good answer to this issue will benefit the whole community.

To anyone who uses LabView professionally: How do you share LV Code?

Don


VI Table.gif



VI Table.gif

Yep. I mean a textual description. If it is a question looking for input, the most valuable info is often the assumptions and goals, then the approach, then if it benefits things, the picture of the code or the VI.

If it is an answer to a question, it often involves a smart-alec comment, overly long background, and finally a description of the solution or a picture of the code that implements it.

Your question about professional usage is a good one. If you go to the NI forums, you’ll be able to observe the daily trade of VI info. I qualify as a professional user, technically, but I’m also privy to lots of internal info. So up until a few years ago, I was often the one doling out the answers. There are a few posts with my name on them.

Perhaps things are changing, but to reiterate my answer, much of the discussion was textual, describing the math or science, not necessarily focussing on the syntax of the language. If it involves performance or syntax, I think little beats a VI simplified to focus on the topic. People don’t usually post the code to their entire hydro-electric plant control or electron microscope just isn’t cool, but fortunately, most elements in LV are pretty modular, and you can often isolate things without too much work. Again, that isolation often points out the problem before you even post the question.

Assuming most apps will be based upon the robotics from WPI, the team code should actually be pretty small. It will of course be highly coupled to the HW setup. I guess we’ll see as things get going.

Greg McKaskle

OK Greg, that makes a lot of sense. I was mostly focused on displaying the specific syntax and settings so that inexperienced users could easily replicate what was done, rather than explaining the concept.

So, it seems that explaining the** concept **is best done with words, and showing the **code itself **is best done by posting the VI (well-commented of course), as is done in the NI forums.

OK, I think I have consensus with myself. :ahh:

Don

where can I find more info about this

I’ve seen some not-so-great methods of sharing a VI lately in the Programming forum.
Could this thread be copied into the Programming forum and stickied?

Thanks!

(If it’s not up to standard, could you point me towards a set of standards to make a thread sticky-quality?)