LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make subvi's when I make use of event structure

Solved!
Go to solution

Hello Everybody

 

I don't really get how to make use of subvi's when I use event structures in the vi?

When just making the buttons connectors on the subvi and assign controls to them the vi stops working as I expected.

 

I added an example vi that I don't get working as an subvi.

 

Thanks in advantage.

0 Kudos
Message 1 of 5
(2,633 Views)

The VI you have attached works. Can you attach the version that does not work?

0 Kudos
Message 2 of 5
(2,628 Views)
Solution
Accepted by topic author Patrick Kerstholt

I dont think you generate any value change event through the input connector, as you hope to do. A semi-ugly workaround is to get the Button references and do a Value(Signal) property.

 

A better way if you want to handly events in a sub-vi is to register user events and send the event register-thread to the sub-vi, where you can use those events in the event structure. Check the User created event and Dynamic event examples.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 3 of 5
(2,623 Views)

Thanks

0 Kudos
Message 4 of 5
(2,599 Views)

Hello,

 

Check that link. Maybe it will help you.

 

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

 

Regards,

 

Message 5 of 5
(2,574 Views)