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: 

Showing subvi icon in Windows taskbar

In my application I want to show an extra icon in the window taskbar at runtime when the front panel of a certain subvi is shown. In practice this subvi is a state machine that is started at the start of the main via the "Open vi Reference Function" and the Invoke node Run VI. At some point during the execution of the main the front panel of the subvi is shown. At that point I want an extra icon (more specific the subvi's Icon) in the taskbar at runtime. 

 

At the moment all my dependencies are build into one executable. Should I change something at that level or is there a possibility to realize this functionality in the code using vi ref property/invoke nodes maybe?

0 Kudos
Message 1 of 9
(2,433 Views)

Hi BdeBruin,

 

put that statemachine into its own executable and call that executable using SysExec…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(2,418 Views)

I am afraid this will not work for my program. The user will open the subvi front panel in the main. The main adds a cluster of information to a queue that is needed and dequeued in the subvi. When the user finishes its activity in the subvi, the subvis front panel is closed again and an event is triggered and processed by the main. (I use an EndevoGOOP400 Active object). Is there a way to parse these in- and outputs using System Exec? Or maybe I can create something like this with Asynchronous call of the Objects constructor?  

 

By the way, the user has to be able to use the Main too while working in the subvi. That's why I choose to create an active object class. I want the icon so the user can see the subvi is still open even if it hidden behind the Main front panel. I would have possibly chosen for a modal vi if the user had to finish his actions in the subvi before entering the Main again, but that is not the case.

0 Kudos
Message 3 of 9
(2,411 Views)

Hi BdeBruin,

 

two executables on your computer can communicate with each other using any kind of network communication…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(2,394 Views)

OK, now we were entering unknown territory for me. You mean replacing my current Queue handler by functions from the 'Network streams functions'? Can I trigger events in the main from the subvi that way?

 

From a quick look it seems an alternative queued message handler. At the moment I create a user event in the Objects constructor and read and register in the main to be processed in an event structure. With a queue I suppose I have to let the main's event structure timeout instantly to check whether there is a message in the Network stream? 

 

At the moment the program is located on our netwerk and various users may open the executable at the same time. Can that cause problems using this method?

0 Kudos
Message 5 of 9
(2,391 Views)

Hi BdeBruin,

 

You mean replacing my current Queue handler by functions from the 'Network streams functions'?

You can also use plain UDP or TCP functions.

There also is a STM library at VIPM.

 

Can I trigger events in the main from the subvi that way?

Your receiver in the main can trigger events once it gets a message from your "subVI".

 

At the moment the program is located on our netwerk and various users may open the executable at the same time. Can that cause problems using this method?

As long as your executables only use the "localhost" for network communication they will not interfere with other user's computer…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(2,386 Views)

Thanks, it is clear for me so far. I will try to implement this and will keep this topic up to date.

0 Kudos
Message 7 of 9
(2,383 Views)

You can also use the attached. It is a network queue that is a drop in replacement for the current Queue VIs.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 8 of 9
(2,366 Views)

Thanks, but I seesm to miss some vi in the vi.lib.

 

Instead I tried using the package here, also attached below. This work fine in the development environment. It also works fine as executable with the remote system as vi in the tester application. But when I build the remote separately and call it through System_exec it gives me error 314350 Create stream writer in the remote application, even with all firewalls are turned off.  

0 Kudos
Message 9 of 9
(2,326 Views)