From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Popup to display values of an indicator as a graph

Hello everyone,

 

I have been trying to find the solution for this some time already. Since my program has lots of measured values I want to include the following functionality:

 

1) Normally values are read out in a while loop and written to numeric indicators.

2) In some cases a representation of the trend is needed for certain values. In those cases it should be possible to click the corresponding indicator and a popup should come up, showing the previous and future trend of that indicator. (The main program should keep on running)

3) The poped up graphs should be closeable. But when they come back up, they should show the entire trend again.

 

To achieve this my plan is to include an event structure to handle the clicks onto the indicators. However i am not quite sure how to create the popups. If I start another VI inside the event structure as a popup, the main program would pause until I close the popup, right? Another idea i had is to start the popup for every indicator at the beginning of the program and then only change the visibility of the popups with the property nodes. The information would then be constantly parsed to the popups with a queue. But the things I tried so far in that direction were not very promissing Smiley Sad

 

I am a bit stuk with this situation and hope you can give me some hints to keep going! Thanks in Advance!

0 Kudos
Message 1 of 6
(2,395 Views)

I am working on a similar problem in my project. I can tell you what my Idea is till now.

 

1. opening the VI in a way, that the main vi does not freeze: try static VI call like shown in the attachment.

2. to bring data to this window you can use a queue, a notifier or an action engine. To keep a history you maybe should use an action engine design or just read some history from a file when starting the VI.

0 Kudos
Message 2 of 6
(2,392 Views)

What you want to do is certainly possible.  It will require three steps:

 

  1. You will need to internally buffer your data so you can plot it when you need it.  There are many options here, but the three easiest are probably shift registers in your data acquisition loop, functional globals, or data value references.  The tutorial Managing Large Data Sets in LabVIEW gives an example of the functional global approach.
  2. In you UI/event structure loop, set up events to launch an independent VI which contains your graph.  You probably only need to write one of these and make it a .vit so a new instance will launch every time.  Communicate with it with a specific queue (generated by your main program).  Communication back from it can also be a queue.  You can find examples of this type of thing in this series on launching top level VIs (link is to last of the series; links to others in the series at the bottom of the first post).
  3. Communicate with your newly launched VI via queue (event structure also works, but I prefer queues).  I would highly recommend the object-oriented command pattern, but if you have not used LVOOP before, you may want to try a standard command processor / state machine architecture for your graph VI first.

Note that VI properties will be very important for your launched VI.  You probably do not want it to be a default dialog, since that will make it modal (on top, intercepts all input).  Whether or not you want to show scroll bars, title, etc is dependent on your application.

 

Good luck.  Keep posting if you need help.

0 Kudos
Message 3 of 6
(2,391 Views)

Hi s-kerst,

 

did the recommendations of DFGray help you with your problem?

 

If yes, let the readers of this thread know. 🙂

 

Best regards,

 

Benjamin

0 Kudos
Message 4 of 6
(2,357 Views)

Hi everyone,

 

I couldnt open the files, since im still using LabVIEW 8.2, but i with the advices I managed to find a solution. It includes the static VI call and the queues as mentioned above. Attached is my result 🙂 Thanks for your help!!!!!

0 Kudos
Message 5 of 6
(2,343 Views)

Hi s-kerst,

 

good to know that! 🙂

 

Good luck with further programming ...

 

Best regards,

 

Benjamin

0 Kudos
Message 6 of 6
(2,338 Views)