LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Events not working in Reentrant VI?

Hi,

I am trying to use mouse events (mouse move, up) in a reentrant VI. It works fine if I simply run the VI. But as soon as I call it from a different VI, the mouse events do not seem to work.

Then I just added a Stop button on the front panel and the value change event does not seem to work either.

Any suggestions?

Thanks,
Heiko

P.S. I am running LV 7.1.1
0 Kudos
Message 1 of 4
(3,189 Views)
Reentrant VIs run in a separate dataspace for each invocation of the VI. This limits what you can do with the front panel and, I think, events.

Perhaps if you explained why you are trying to use a reentrant VI for a user interface, someone may be able to suggest an alternative.

Lynn
Message 2 of 4
(3,178 Views)
Lynn is correct.

When running reeentrant VIs, you simply don't get to see the front panel. Only one front panel will be visible, whereas there may be 5-10 instances of the sub-VI. In this case, the "visible" front panel is disconnected to every instance of the VI running in the background. As such, I don't think ANY front panel interactions will work properly.

For some reason I don'f fully understand, this isn't the case when running the "reentrant" as a top-level VI (running directly from the VI itself).

You could try launching multiple instances of a VI template via VI server though, this allows many different VIs to run too, but each gets it's own front panel, and so the front panel operations will work.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 3 of 4
(3,176 Views)
Thanks,

This is more or less what I thought the problem was. Just wanted to make sure I was not making some stupid mistake. I worked around it by using multiple instances of a template rather than a multiple copies of reentrant VI.

Heiko
0 Kudos
Message 4 of 4
(3,162 Views)