LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

having more than one popup graph, possible?

Hi to all!

   I have a question. I'm developing an application that has the following requirement: It has to be able to show pop-up graphs about acquired data, one, two or three, as many as the operator needs. The problem is that I can't have two popup graphs (showing acquired data in real time) simultaneusly. When I have one open and I call the second one, this second one doesn't start. But if I close the first one, I can pop up the second one and see the aquired data of the second sensor.


Is it possible to have two graphs in other windows (as popup graph than I can call whenever I want) simultaneusly, showing real time acquired data?

I'm working in LV 7.1.


Thanks
0 Kudos
Message 1 of 19
(3,453 Views)
I don't believe this will be possible in LV 7.1, but in 8.0 and above it certainly is. (It's possible I'm missing something, so if someone wants to correct me, feel free Smiley Tongue). Here's the reason:

The problem you seem to be having is that the popup VI you are using to display the graph data is non-reentrant. What that means is that there's really only one copy of it in memory, and everything that calls that subVI has to share that one copy. Only one call to it can be made at a time. This is why you only can only pop up a graph on one signal at a time.

There's also a notion of reentrant VIs. Reentrant VIs make a separate copy of the VI in memory for each different place you call them on the block diagram. The separate copies can therefore run at the same time independently of each other. So what you would want would be a reentrant VI that you could instantiate for any number of your signals. The problem is that reentrant VIs in 7.1 and before always shared one front panel in memory, so they couldn't act like popup dialogs. 8.0 and above now allow reentrant VIs to act like popup dialogs by giving them each their own copy of the front panel.

So upgrading is one option. Now, the fact of the matter is that your requirements state that the user should be able to pop up any number of these graphs, but you might ask yourself how many the user could actually view on the monitor at one time. 10? 20? I'm guessing there's some max number the user just can't possibly exceed or even pay attention to visually. So my opinion is that the LV 7.1 solution will involve making some max number of copies of the VI on disk, giving them enumerated names (like subVI 1, subVI 2, etc) and then reusing this fixed number of subVIs cleverly. It's rarely the case that you really need an unlimited number of graphs or popup dialogs.
Jarrod S.
National Instruments
Message 2 of 19
(3,439 Views)
What about making the pop-up a template? This should work in 7.1. You also would need to call it differently. If the pop-up has a while loop and a stop/close button, then that VI has to terminate before control is returned to the main VI. If you use VI server and an invoke node with the Run VI method, then you can specify Wait Until Done as false.
Message 3 of 19
(3,433 Views)

Pssst...Jarrod....

How about a VIT called dynamically?

Make sure they show there front panel when opened and are NOT modal.

Use named quest to pass the data.

This worked back to LV 5.1.

Ben

RATS! Beat by the big DK again! I do like your idea though...

Message Edited by Ben on 10-19-2006 12:11 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 19
(3,434 Views)
Great minds think alike.Smiley Very Happy
Message 5 of 19
(3,421 Views)
Well, at least I knew I was probably forgetting something. From my original post:

"(It's possible I'm missing something, so if someone wants to correct me, feel free )"

Great ideas on the VIT, everyone!
Jarrod S.
National Instruments
Message 6 of 19
(3,410 Views)
Hello to all!

   First of all, thank you for your attention. I haven't tried to do it in LV 8.0 or above versions, but I'm going to answer if we have a newer version of LV at job. Going back to LV 7.1, I've configurated the called VIs as "Re-entrant" (note that I use one VI for each graph, not one as Jarrod thought), but there is no change at the execution. I've also tried to make a template, and invoke it in different ways (creating a new VI in each call), and the problem persists. I don't know what is happening, but it seems that a second pop-up can't be opened if there is one openned. When you close the first one, you can open the second one, and so on. The requirement is that the main VI should be able to call more than one VI to show the acquired data, so the re-entrant mode doesn't work, because it is the same VI (main) who calls more than one time the template or the set of VIs to visualize data (I've tried the two ways)

   I agree with Jarrod when he says that the user can't pay attention to 10 or 20 graphs simultaneusly (even 5), but It may be interesting to have 2 or 3 (no more) graphs monitoring real time acquired data.

   The configuration of the called VIs are "not modal". I've tick the option "default".

More Ideas? I'll tell you if I reach the solution.

Thank you again

0 Kudos
Message 7 of 19
(3,392 Views)

"More Ideas? "

Sure!

Please post a set of VI's that demonstrates what you have tried so far.

Somebody will take a look and give you a hint.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 19
(3,378 Views)
Making the VI re-entrant or a template will not make any difference if you are calling a VI statically. I'm assuming that each separate subVI has a while loop with a stop button? What you are seeing is normal behavior. You pass control to the subVI and the main cannot do anything until the subVI exits. Using the invoke node as mentioned instead to launch the subVI is one way to avoid this. Another is to have a separate while loop in your main program for each subVI. That's not too practical if you have an unknown number of subVIs that you want to pop-up.
Message 9 of 19
(3,375 Views)
Good moorning!

  as Ben asked for, I've just attached some VIs to show all of you what I'm trying to do. I've omitted a great part of the functionality, and the acquire data is now random number, but it doesn't matter in my objective. When you push the booleans (Popup S1, Popup S2), a VI is called and executed. But it seems than we can't call a second VI before exiting the first one.

  You can edit the files if you want to. Please don't be so severe, hehe!


Thank you
0 Kudos
Message 10 of 19
(3,365 Views)