LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tank system, customized front panel

Solved!
Go to solution

I making a tank system, instead of having all the settings for the system's in the front panel. For example regulate the water level, stop etc. It is possible get these control and indicators for the water tank system  to show up in another window by pressing the tank in the front panel? 

0 Kudos
Message 1 of 3
(2,895 Views)
Solution
Accepted by topic author Matskk1994

If you're familiar with the concept of a subVI, you can make a subVI act as a popup by messing with the VI properties. You can trigger this popup in your code by using a Mouse Down event or something similar. Usually when I have configuration settings, I like to hide them on a separate tab on the front panel. I like tab controls though, and some people don't.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 3
(2,891 Views)
Solution
Accepted by topic author Matskk1994

It is definitely something that can be done. For a PC only application I typically keep all of the code that needs to keep running no matter what else is displayed in the "main.vi", and then I call different subVIs into a panel control to display what te user needs to see. I pass data between the Vis with functional global variables, which can be a problem if you write data in more than one place and create race conditions, so don't write data from more than one place. It is also a great idea to typeDEF your data so that you can easily change it as people tell you about functions that "you should have tthought of, even though it wasn't mentioned in the original design meeting." I don't know if you are using the DSC module or not, but you can also put images over controls to make them look like what you would like. For an app that needs to read/write to a database, which is just about everything I code here, I put my database read/writes into separate loops on the main.vi to keep the user interface and other functions running if there is a network issue.

Unless you have a PC with realtime I advise against a PC only application for anything that can harm people or equipment. For those applications I use cRIO racks and network streams to/from a PC for user interfacing. This adds a great deal to the complexity, but it is MUCH safer. Of course make certain that all safety features including e-stops are taken care of as required by the authority having jurisdiction in your area. On the cRIO you can start from a template to get an idea of the different loops you should have, but I play pretty loose with this so far as I'm not dealing with anything truly high speed. We make glass in this factory, and we have to work in seconds on most things not microseconds or even less.

Glad to answer questions. Thanks for any KUDOS or marked solutions 😉
Message 3 of 3
(2,878 Views)