LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Variable numbers of diagrams on frontpanel

Hi,
 
I have the following problem: I have a system, that is communicating with the computer and is sending about 30 different parameters approximatly every second.
 
What I want to do, is to build a labview application, where the user can decide, which parameters are shown on the frontpanel (no problem), of which parameters an avverage is calculated (no problem) and where the user can decide, how many diagrams he wants to have, and what should be shown there (big problem)...
 
Of course, it is possible, to create let´s say 10 diagrams, and just show the ammount of diagrams, that the user wants to have with the diagrams he wants to see... Problem: If the user should decide, that he needs more diagrams, this does not work any more.
 
Therefore the question: Is there a way to programmatically create new diagrams while the program runs - and fill them with data? Or is there a way, to build - for example - an array of diagrams, where each diagram has its own data??
 
Regards,
 
Frank
0 Kudos
Message 1 of 6
(3,037 Views)
What do you mean by diagrams? A diagram is the source code in LabVIEW and is a separate window from the front panel. Do you want the ability to dynamically create block diagram code?
0 Kudos
Message 2 of 6
(3,030 Views)
Hi,
 
sorry for the confusion - what I meant with diagrams are graph-elements on the frontpanel, to plot for example the system power over time, the system voltage over time, the system current over time, etc.
 
As there are approximatly 30 different parameters I can read from the system, I want the flexibility, that the user can descide:
- how many graphs are plottet
- what is shown in the graphs.
 
Regards,
 
Frank
0 Kudos
Message 3 of 6
(3,030 Views)
This question is not uncommon. You can't have an array of graphs, so you won't be able to show or populate a dynamic number of graphs at once. One thing you should ask yourself is how many graphs a user would possibly want to view at once. It's unlikely the user could visually register more than - say - 5 graphs at a time. I would recommend figuring out some maximum number of graphs to show, and then dynamically route a subset of the parameters being sent to the system to these 5 (or however many) graphs. Then, if your user wants to view less than the max, you can hide some of the graphs by setting the Visible property to False.

If you want to know what a really dynamic situation might look like, you could check out this example I did a while ago. But note that it's not so much an approved way of doing things as just a proof of concept. It's probably more difficult than it's worth.
Jarrod S.
National Instruments
0 Kudos
Message 4 of 6
(3,019 Views)
It would also be possible to show a dynamic number of graphs at once by having multiple popup dialogs with a graph on them. You could launch any number of copies of these dialogs with different data mapped to each graph. You can spawn separate copies of dialogs (or any VI) dynamically by saving them as VI Templates and launching them using VI Server instead of just calling them as a subVI. Search the site for these terms and you should see some examples.
Jarrod S.
National Instruments
0 Kudos
Message 5 of 6
(3,016 Views)

You can put only so many waveform graphs on a front panel.  I doubt that you could put 30.  You could put just a few graphs and under each graph have a selector, like an enum or a numeric control, to select which waveform you want to display on that graph.  In the block diagram, you would have to have a case structure for each waveform graph and use the selector to choose which waveform gets wired to the graph.

The more graphs you add, the more complex the wiring will become.  The 30 waveforms would have to be wired to each of the case structures.  This is going to be a mess of wires.

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(3,015 Views)