LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

User Event Problem (call sub VI in dynamic method)

Hi,Everybody

I have a problem about “User Event”.I have three VI :1)MainVI(call Generate Event VI and Receive Event VI in static method or dynamic method)   2)Generate Event VI   (Generate User Event) 3)Receive Event VI(Receive User Event).

 

1)Tere is no problem in static method .:)

2)But ... The  Generate Event VI  report error (error code 1,Generate User Event in Generate Event VI.vi) in dynamic method.:(

Please Help me.

 

 

Using LabVIEW 8.0.0 on Windows XP
Download All
0 Kudos
Message 1 of 3
(3,240 Views)

Hi Richar,

      The problem is that Main is terminating after launching the two Sub-VIs.  Since Main allocated the Event reference, the reference is destroyed when main terminates - leaving Generate and Receive holding an invalid Event reference.

Just put a loop in Main that prevents it from terminating - then Generate/Dynamic works too! Smiley Wink

 

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 3
(3,218 Views)

aha,nice!Thank you,tbd!:smileyvery-happy:

 

Cheers!

Using LabVIEW 8.0.0 on Windows XP
0 Kudos
Message 3 of 3
(3,202 Views)