04-08-2009 06:42 AM
Hello,
I heard that using express VIs is not a good practice, where I found they add to more convenience when coding. Could you tell me what should b the best practice? Using express VIs or developing logic using function?
Thanks.
Pritam
Solved! Go to Solution.
04-08-2009 07:00 AM
For myself I avoid express VI because they allow me to skip basic understanding. They can be a great tool to get started but I would encourage anyone that uses them to them right-click the express VI >> Open Front Panel >> Convert. Then study the underling fictions and steps "within" the express VI that have accomplished what you were trying to do.
Next time you can build your own!
Also, for DAQ, etc. I think express VIs typically initialize a resource, perform and action, and then close the resource. Many times this is undesirable - for instance acquiring data repeatedly - therefore, if you know what the express VI is doing you can build a more efficient overall program (for example moving initialize and close functions outside an acquisition loop). Many shipped examples accomplish the same things as express VIs with much better programming practices.
Again, not necessary a bad way to start but I don't think they are good practice moving forward.
Cheers,
04-08-2009 07:45 AM - edited 04-08-2009 07:46 AM
Jolt covered this Q pretty well.
The opinion of the LabVIEW Champions re:Express VIs was summarized by Christian in one of his LabTOONs found here.
The following was linked from that thread.
Ben
04-08-2009 08:27 AM - edited 04-08-2009 08:27 AM
In that other thread I mentioned my bumper sticker but never posted an image. Here you go!
Ben
04-08-2009 08:35 AM
I wouldn't consider them bad style. If they do what you want/need, everything is fine. I never got really used to them (as the LabToon points out, a fate of a lot of long-time LabVIEW coding). I actually took some time to get into them, because they allow really fast 'coding'. Just some are occasinally found in my code, that is the Build Text and the Display Message to User.
The Analysis Express stuff as well as the DAQmx assistant are really handy when prototyping or troubleshooting the hardware. But in my code I need more functionality than they offer...
Felix
04-08-2009 09:03 AM
04-08-2009 01:59 PM
I've never used an Express VI. I never plan to. I think they actually hinder learning, not only of the LabVIEW language but also of good programming practices. Jolt put it perfectly -- they allow the user to skip understanding of what's actually going on in their code. That's not good. In my experience (hardware as well as software), if the person designing the system doesn't understand what they're designing, they're begging for problems. And the problems invariably oblige.
The examples that ship with LabVIEW do a pretty good job of illustrating the basic concepts. If you are genuinely interested in learning the language, I would start with the shipping examples and not the Express VIs. Heck, even if you're NOT interested in learning the language...start with the shipping examples!
04-08-2009 10:12 PM
A good metric would be how many people who passed the CLD exam used an Express VI.
If I wrote an Expres VI and presented it to my coworkers ... you've got to be kidding.
04-09-2009 05:58 AM
gchristi1 wrote:...
If I wrote an Expres VI and presented it to my coworkers ... ...
Good point there!
Has anyone outside of NI ever written an Express VI themselves?*
What did it do?
Was it worth the effort?
Curious,
Ben
* I have read about creating them but have never done it myself.
04-09-2009 06:59 AM
Ben wrote:
gchristi1 wrote:...
If I wrote an Expres VI and presented it to my coworkers ... ...
Good point there!
Has anyone outside of NI ever written an Express VI themselves?*
What did it do?
Was it worth the effort?
Curious,
Ben
* I have read about creating them but have never done it myself.
If I'm correct Wiebe from Carya has built them.
His comments were that it isn't that hard.
Ton