cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Swapping Ui's dynamically

Hello,

So now the Vis are switching when i use the ring, but they are not running. 

Julsbng_0-1709571027511.png

 

 

Julsbng_1-1709570737534.pngJulsbng_2-1709570749516.png

If i use a Run vi now it is not working. It shows nothing then...

0 kudos
Mensaje 11 de 20
995 Vistas

@Julsbng wrote:

Hello,

So now the Vis are switching when i use the ring, but they are not running.

If i use a Run vi now it is not working. It shows nothing then...


You need to remove, then reinsert on change, something like that:

subpanels.png

0 kudos
Mensaje 12 de 20
975 Vistas

Hello,

thank you i will try this.

You don’t have a connection to the N of the for loop, isn’t it needed or it won’t run?

0 kudos
Mensaje 13 de 20
959 Vistas

Its working perfectly thank you very much. 

But i still got one issue. The size of the front panels of the Vis are the same size as the subpanel but its not fitting correct when i start the programm. i need to adjust the subpanel with the slider so i can see the whole front panel and not some empty space. How can i fix this? I know that i can do some setting with window size etc but this didnt work maby  i did somethign wrong. I will attach some pictures tomorrow.

Thank you very much for your help so far. !

best regards

0 kudos
Mensaje 14 de 20
941 Vistas

@Julsbng wrote:

Its working perfectly thank you very much. 

But i still got one issue. The size of the front panels of the Vis are the same size as the subpanel but its not fitting correct when i start the programm. i need to adjust the subpanel with the slider so i can see the whole front panel and not some empty space. How can i fix this?


The trick which I using time to time is to set properties as shown below:

Screenshot 2024-03-04 21.54.20.png

Just set the size equal to the size of your subpanel, you will see gray border which can be used as guide to control that all UI elements placed on the BD are fit with visible area (this border will be not displayed in runtime). Don't forget to set Origin to 0,0 - this will move it to left upper corner  and disable scrollbars if you don't need. That is.

Mensaje 15 de 20
935 Vistas

Hello, Thank you very much this is working aswell but i got a problem now that i expected to happen... 

The Vis share similar output and so the DAQ is reserved when starting them simultaneously. 

Julsbng_0-1709637167154.png

Julsbng_1-1709637184408.png

When i say stop, the one Vis is working but when i use the Switch to the other Vi its not running. 

Any idea how to avoid this to happen?

I think in need to Start the applications one by one and quit the other before opening the new one.... but i dont know how to do this

 

 

0 kudos
Mensaje 16 de 20
921 Vistas

I got it run now. 

Julsbng_0-1709639420004.png

Thanks for all the help! Really appreciate. 

 

0 kudos
Mensaje 17 de 20
894 Vistas

Using Abort to stop a VI is like using a tree to stop the car. It works, but might have some consequences.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 kudos
Mensaje 18 de 20
891 Vistas

I would love to get a better solution here! I appreciate any tips to get better and improve. 

0 kudos
Mensaje 19 de 20
886 Vistas

You mentioned the two VI's use similar DAQ? I assume they don't use the same channels though, right? If so, you can create and start the DAQ task first in the main VI (that reads all channels) and just use the task in the two VI's and grab the relevant ones.  

 

That way both subVIs can keep running even when they're not shown.

 

I'd also create a way of stopping the VI's gracefully. Send in (or obtain through name, it's less recommended but might fine in this case) a User event or queue so you can for starters signal a Shut down command, that way it can easily expand later on if you need more functionality.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 kudos
Mensaje 20 de 20
881 Vistas