LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview on multiple screens, two seperate front panel?

I couldn't really find a good answer for my situation, so I'm starting a new tread. 

 

I'm controlling my lab fully from labview. Hence I have quite much stuff on the frontpanel. To make it easier we have two monitores where I currently use the FP.WinBounds to force the frontpanel to open over my two screens. But what I want is to have two seperate front panel open when I start the VI, such that the user can decide hemself where to place the windows. In this senario I'm using to extended screens with the left one being the main screen. In other instances this might not be the case. 

0 Kudos
Message 1 of 5
(5,337 Views)

So what is your question? I can only tell what I do in such cases: I can launch extra VIs dynamically, showing their front panel. I manage communication using dynamic User Events between the Main top level VI and such dynamic VIs. So if you want to use multiple monitors, why not use multiple front panels?

 

ps.: I like your GUI design, nice but not overcrowded...  

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

The program itself is quite complicated, running 3 asynchronous queues etc. Launching an extra VI dynamically might be the soulution, but I don't know how to do that. I want it so that when my endusers click on the desktop shortcut I made for them, 2 windows are opened. The user can then maximize it on the screen they want and just run the program. 

 

Is something like that possible? I tried to add a subVI frontpanel to my setup, the problem is that with the complexity (probably more than 100 different controllers etc), I completly messed it up. The simplest would be if there was an option in labview to have 2 front panels running on the same block diagram?

0 Kudos
Message 3 of 5
(5,318 Views)

Hi martvald,

 

Is something like that possible?

Yes, use two VIs running in parallel…

You don't need to call the VIs dynamically, you can call them as usual subVIs from your MainVI (or init routine)!

 

I tried to add a subVI frontpanel to my setup, the problem is that with the complexity (probably more than 100 different controllers etc), I completly messed it up.

So it's a PEBCAK 😄

When you mess up things you need to clean them up!

 

The simplest would be if there was an option in labview to have 2 front panels running on the same block diagram?

No, that's not possible. One VI has one FP and one BD…

Best regards,
GerdW


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

You could also just use a subVI in a parallel While loop, and communicate between the main VI and this subVI using a command Queue / Notifier / User Events, pick one method...

 

I attached a simple example using User Events to pass data between the two VIs. Of course, this is just an example, you need to implement proper error handling strategy, etc. Also, I would create a lvlib with public wrapper VIs, so the block diagram would be more tidy not showing too much of the Event functions...

 

Edit: also pay attention to the window settings for the subVI, specially the "Show front panel when called" and the "Close afterwards if originally closed" options...

 

settings_FP.png

0 Kudos
Message 5 of 5
(5,289 Views)