LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to call single vi in multiple windows

i have one single graph accessing data through global variable in a file grpah.vi.  Graph runs in a while loop.
In my main vi, i have 4 sub panels. pressing respective buttons should display graphs in respective sub panels using graph.vi . I am using event structures for button clicks.
Can some one guide me to implement the program.
Ranjith
0 Kudos
Message 1 of 8
(4,290 Views)
Hi Ranjith,
you can one vi only show ones in a subpanel. Use the invoke node to add and remove the sub vi to/from your sub panels. Before you add it to a new sub panel you have to remove it from the other one. Use a shiftregister to store where it was last inserted.
 
Hope it helps.
Mike
0 Kudos
Message 2 of 8
(4,289 Views)
Hi Mike,
Thanks for the quick reply.
Okay. let me know weather i can do defferently.
I have one button "Open in new window" in my main vi. pressing that i want to call graph.vi in multiple windows based on number of times he pressess the button.
Again graps run in while loop accessing global data.
How can do this?
Ranjth
0 Kudos
Message 3 of 8
(4,286 Views)
Hi Ranjth,
if you need your graph.vi multiple times, i recommend to create a vi template. If you use it later, you will get a new instance for each call. If you make it in this way, then you can show it at the same time in all sub panels.
Mike
0 Kudos
Message 4 of 8
(4,284 Views)

Mike,

I am new to LabView. can you please tell me what is vi template? If you can explain more it would be really helpful to me.

Thank you

Ranjith

0 Kudos
Message 5 of 8
(4,279 Views)
Hi Ranjith,
attached you willl find an example.
 
Hope it helps.
Mike
Download All
0 Kudos
Message 6 of 8
(4,265 Views)

Hi Mike,

This helps me greatly. Thanx.

I need to provide a option to display graph.vi in multiple windows clicking single button multiple times from main window. . Graph collect the data from global variable. i tried this, but some times 2nd new window opens on 1st  window or i get blank 2nd new window. Can you help me !!

Ranjith.

 

0 Kudos
Message 7 of 8
(4,260 Views)

Hey Ranjith,

I found an example called Occurences2.zip from Re: Community Nugget 1/29/2007. It should help you understand how to call a predetermined amount of VIs.

The only thing is that you'll have to specify a predetermined number of VIs beforehand.

Hopefully this helps!!

Aashish M
CEO
TransferFi
www.transferfi.com
0 Kudos
Message 8 of 8
(4,211 Views)