Showing results for 
Search instead for 
Did you mean: 

Firing of Event Structure in SubVi in SubPanel on Main VI

I've come across a problem in using event structures in a sub-vi.
I'm running the subvi through the main vi front panel using a subpanel structure.
when I run the subvi standalone, it works fine, but as soon as I try running it from the main vi I'm having problems.
I've attached a simplified example of what I've done.
Any solutions or suggestions on how to get around this would be helpful.
0 Kudos
Message 1 of 6

Hi Jeff,

I've modified your vi's with the following changes:

1. Added "stop" case to your testsubvi event structure.

2. Added Runvi vi method to your test vi.

Hope this now does what you wanted (you didn't describe the problems, so I guessed!)

Message Edited by SandmanUK on 02-19-2006 11:27 AM

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 2 of 6


That's exactly what I wanted. 

This is the first time I've used the Sub_panel structure and didn't realise that there was a RUNvi method.

Thanks for the help



0 Kudos
Message 3 of 6
If I can follow up here.  The example was very helpful to me, just exploring how to use subpanels.  I notice that the VI holding the subpanel does not use an event structure.  If the subvi you are calling uses the event structure, the main vi cannot have one.  Is this correct?
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 4 of 6
0 Kudos
Message 5 of 6


There really isn't any restriction of using an event structure in the mainvi (that holds a subpanel).  As an example you could have an event structure in your main vi to call different subvi's into the subpanel; or you could have an event structure to do other things in your main vi.  Have a play around with it. 

hope this helps


Message Edited by jtsa on 03-30-2006 06:30 PM

0 Kudos
Message 6 of 6