LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure in Sub VI

Solved!
Go to solution

Hello ,

 I have a developed a program which captures video and user can save images out of it. I have used .NET reference to handle the video part, and the VI is attached in this post. Now i have to make this VI as a sub VI and running this from Main VI. I tried creating event structure in Main VI which i used in sub VI , still i could not suceed. Kindly assist me in this regard

0 Kudos
Message 1 of 5
(2,737 Views)
Solution
Accepted by topic author Bala.Muthu

Hi,

 

without looking into the details of your code please take a look at this link:

 

Detecting an Event in a SubVI from a Top Level VI

http://digital.ni.com/public.nsf/allkb/A882E27D1D7A949386256E0D0066B91A?OpenDocument

 

 

Maybe this already answers your question.

 

Regards,

Michael

0 Kudos
Message 2 of 5
(2,662 Views)

Hello Michael,

 I have attached a model in which Main VI calls the Sub VI using Event Structure. Two events can occur in Main VI and their corresponding event Structure is called in Sub VI using Register events. When i run this VI the out put is fine some times but other times i need to trigger event many times before i can see its effect in Sub VI, my doubt is that Register events are reliable, whenever (during the execution of LV) if event occurs will surely its code in the sub Vi gets executed?

also I have put a indictor(numeric) in the SUb VI which i connect back to Main VI, when i run, i can see the result only in the sub VI not in the main VI.how to see in Main VI?

I have used the this model (which is attached ) to implement my project(which i already mentioned) . one switch for starting the video and other for recording the image. The video is getting started with out any trouble, but imgae is recorded only few times when i press the button which is for image recording, most of the time second event fails to get executed. Also there are difference in output when i run with and without "Highlight execution", why this happens, is this because of Reg events?

 any more info if required let me know, i will provide.

0 Kudos
Message 3 of 5
(2,532 Views)
Uncheck Lock Panel untill handler completes in register events!!!
Thanks
uday
0 Kudos
Message 4 of 5
(2,461 Views)

More important, ONLY ONE register per event handler.

 

You have two event handlers, then you need two registre events.

0 Kudos
Message 5 of 5
(2,458 Views)