LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pop-up window showing graph

Hi!

I'm working on simulating tank-levels in a tank-system with a PID-controller.
And I was wondering if its possible to have a button that activates a pop-up window which indicates current level and setpoint for each tank?

Thanks in advance



0 Kudos
Message 1 of 5
(9,982 Views)

Hi MrNorway!

This is definitely possible! A great example that demonstrates this is called “Dynamic Load Example” and can be found in NI Example Finder.

Regards
Øyvind Ø

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

Thanks Øyvind!

But I have all my code in a simulation loop, so Labview will not let me place other structures inside it.. (the for-loop and case structure).
Know how to fix it? I've only used Labview for some months, so im still in a learningprocess 🙂

Regards
Bjørnar



Message Edited by MrNorway on 01-15-2008 04:18 AM
0 Kudos
Message 3 of 5
(9,925 Views)
If I understand correctly, you would like to add a something that just shows the graph and be able to close it, with minimal modification to your existing code, right?
 
An actual "pop-up" window would not work for you, in this case, but you can do the next best thing 😉
 
Create the button.  Since I do not know what wyour software structure looks like, I cannot go into details about implementing the button.  I usually use event structures, so I would simply add an event for that button.
 
Where you handle the button being pressed, simply call a sub-vi.  That sub-vi would contain a graph indicator that gets its data from either a control or by reference (which is shown in the attached image).  You will need a button or some means to close the window (a good approach is to have a close button within an event structure which stops a while loop)  Also configure the Window Apperance which is found in the VI properties, to open when called and close afterwards.  This will give the effect of a popup window.
 
The above is a very basic and quick description.  This can be a starting block.  There are other ways of doing this, but this is the easiest to describe.
 
JLV
 
The graph in this image is actually from the sub-vi.  The example uses a reference to a property node.  If you use something like this, it may be simpler to wire the 2D array to a numeric array control directly to the graph in the sub-vi.  WHen I was starting the example, I had something else in mind.. But let's keep it simple for now.. 😉
 
 
Very improtant to have the popup window affect.  If you are familiar with Open-G, you can find some nice window re-size vi's.  For now, to try out your code, you can manually size the window around the graph.  The important selections are "Show front panel when called" and "close afterwards..."
 



Message Edited by JoeLabView on 01-15-2008 08:10 AM
Download All
0 Kudos
Message 4 of 5
(9,907 Views)
Thanks Joe!

That helped alot! 🙂


0 Kudos
Message 5 of 5
(9,889 Views)