From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change (animate) icon of currently running VI

Dear forum,

I currently try to use a LabVIEV VI as a simple sequencer: Several (very slow) actions have to execute one after another. Each action is represented by a Sub-VI, some actions are executed several times. While the main VI is running, the currently executed Sub-VI (and only this one) should be highlighted as its icon is changed or animated in the block diagram (like when you pause the execution of a VI).

 

With scripting enabled I modify the VI icon with the "VI Icon.Get as Image Data" / "VI Icon.Set from Image Data" invoke nodes (see attached exmaple in LV 2014: <Main.vi> calls <ChangeMyIcon.vi>). Works great, but when I implement this VI multiple times into a main VI (like my example), ALL of these VIs begin to blink when ONE of them is currently running.

 

Is there any way to modify only the icon of the running VI, even if I use the VI several times? I tried to make <ChangeMyIcon.vi> reentrant, with no luck.

 

Regards,

cpschnuffel

0 Kudos
Message 1 of 5
(2,869 Views)

You didn't attach the example.

 

Ben64

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

Hi Ben64,

I tried to attach the VIs directly, but that didn't work. Maybe with this zip file?

 

Regards,

cpschnuffel

0 Kudos
Message 3 of 5
(2,860 Views)

The VI icon belong to the "master " version of the VI, so even if you make them reentrant all the clones icon will be modified.

 

Ben64

0 Kudos
Message 4 of 5
(2,850 Views)

But LabVIEW does something similar with the VI icon when in pause - and that only with the one becoming active. How do they realized it?

 

cpschnuffel

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