LabVIEW Development Best Practices Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Progress Bar API for LabVIEW

This is library for a progress bar, but since I've found myself using it in several of my recent applications, I thought I'd package it up and share it with the community.

12-4-2012 12-02-32 PM.png

The API allows you to create an instance of the progress bar and returns a notifier reference which is used to increment it (and optionally display the name of the current item being loaded). The progress bar will only appear if it takes at least 500ms to load something in order to avoid watching the window rapidly flash and disappear during fast loads.

Version 2.0 features the ability to enable cancelleation (can be turned off), which returns a boolean value the next time the 'Increment Progress Bar' VI is called.  The included example has been changed to illustrate this new feature, as well as how parallel processes can both increment the same progress bar and also be notified of a cancellation. This version is only available for 2012

Version 1.0 is still available for those of you who want to use it with 2011, but due to the use of the a-sync call, it cannot be saved for previous versions.

12-4-2012 11-58-02 AM.png

Elijah Kerry
Chief Product Manager, Software Platform
_______________________________________________
Follow my Software Engineering for LabVIEW Blog
Comments
Active Participant jlokanis Active Participant
Active Participant

I don't think you want to use the 0x100 option when calling your external VI.  The help states:

0x100 Prepare to call and collect—Use this option flag when you want to collect the results of an asynchronous call to a target VI with the Wait On Asynchronous Call node. If you use this option flag, you must include one Wait On Asynchronous Call node for every call that you begin with a Start Asynchronous Call node to ensure that LabVIEW does not retain any started calls in memory indefinitely.

Since I don't see a call to the Wait On Asynchronous Call in your code, it seems like option 0x80 would be more appropriate.

-John
------------------------
Certified LabVIEW Architect
Active Participant Elijah_K
Active Participant

Good catch - I fixed those and a few other minor things in 1.0.0.7

Elijah Kerry
Chief Product Manager, Software Platform
_______________________________________________
Follow my Software Engineering for LabVIEW Blog
Active Participant LDBM
Active Participant

Does ver 1.0.0.8 work ?

Thx.

L.

Member dougm
Member

Nice, simple tool.  Thanks for sharing it!

Noticed one issue: the "name" input of the increment function doesn't do anything.  It would be easy to conditionally append this to the displayed string, but currently it doesn't go anywhere.

Cheers,

Doug

Member Staab_Engineering
Member

Looks like you have a typo in there. Is it available for 2011 or 2012?

Active Participant Elijah_K
Active Participant

I corrected it - thanks!

Elijah Kerry
Chief Product Manager, Software Platform
_______________________________________________
Follow my Software Engineering for LabVIEW Blog
Member hellobunnychicken
Member

Version 2.0 is not compatible with LV 2012:

VI Package Manager not compatible with LV 2012 even though it claims its LV2012.png

Active Participant David_Staab
Active Participant

hellobunnychicken wrote:

Version 2.0 is not compatible with LV 2012:                 

I opened the spec file in the package, and it does indeed support LV 2012 or newer. There are no required or conflicting packages, either:

[Platform]

Exclusive_LabVIEW_Version=">=12.0"

Exclusive_LabVIEW_System="ALL"

Exclusive_OS="ALL"

[Dependencies]

Requires=""

Conflicts=""

My guess is that you don't have LV 12.0 or newer installed on that system, or your installation of VIPM somehow can't find it.

Member hellobunnychicken
Member

I do have LV 2012 SP1 installed on this system. I didn’t write the code for the VI Package manager, so I can’t comment on why it can’t find the LV 2012 SP1 installed on this system, other than sloppy coding practices.

Active Participant David_Staab
Active Participant

Best of luck.

Member hellobunnychicken
Member

Luck has nothing to do with the fact that Version 2.0 is not compatible with LV 2012.    

Screenshots don't lie.           

Active Participant Christian_L
Active Participant

I just tested the version 2 package with VIPM and LV 2012 and it does install and work, so we need to look at why your VIPM is not able to find/connect to LV 2012.

In your VIPM installation please verify that VIPM is able to communicate with LabVIEW 2012. In some cases, VIPM loses connection to an open instance of LabVIEW in which case you need to manually close LabVIEW, and let VIPM open it again to re-establish the connection.

VIPM Options.png

authored by
Christian L, CLA
Principal Partner Development Manager - Partner Program - National Instruments

  
Contributors