LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Sub Vi that contains event structures

What I want to do is place an event structure that is contained inside a sequence structure inside a sub vi. The event on the event structure is triggered by a selecting a row of a list box which is contained in the main vi. My normal way of creating sub vi is to highlight the area I want to turn into a sub vi and then go to “create subvi”, this however does not work with event structures. So I would be very grateful if someone could give me some advice on how to achieve this.

 

 (P.S I have attached  a simplified version of the problem and using labview 8.2.1)

0 Kudos
Message 1 of 3
(2,492 Views)

you better use dynamic event registration for that. check out this thread, and the example of tst:

http://forums.ni.com/ni/board/message?board.id=170&message.id=242571#M242571

also, be carefull when using an event structure in a sequence structure. the two structures tend to be incompatible design patterns. rethink the purpose of the subvi, and see if you can eliminate either one of those, or at least make them totally independant (i.e. not in the sequence).

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 2 of 3
(2,487 Views)
ok thanks for the quick reply
0 Kudos
Message 3 of 3
(2,481 Views)