12-02-2009 12:46 AM
Hello Everyone,
I need some help with Events in my application.
I have a LV application that calls test VIs dynamically. The user has the option of choosing one or more test VIs to run. I am using dynamic events to capture some of the events happening in the test VIs and act accordingly in my application. There is no issue at all in running this totally as an application.
To allow the user to debug the test VIs, we recently decided that we open up the test VIs in IDE forcefully. So the user can use probes, break the flow, etc to debug the test VIs and see if they are functioning as expected. But, in this case, the event references become invalid since I am opening the VI out of the executable. Can anyone suggest a method where I would still be able to process the events from test VIs?
Thanks,
Saranya
12-02-2009 09:51 AM
12-02-2009 10:41 PM
Hi smercurio,
To open the test VI in LV IDE, I am opening the application reference with localhost as the machine name and pass it to the Open VI Reference function.
The Test VIs get the event references through Shared Variables. Event reference is contained in the Shared Variable.
To give more idea, we have totally decoupled the test VIs and the executable - not even a subVI is shared between them. Once we have deployed the application, the user will still be able to open up the test VIs and edit them and be able to run the edited test VI. User can also add test VIs and call them from the executable. Things like Abort, Pause are communicated through Shared variables. Results are shared through Queues. This queue is also getting affected by the Debug mode we are trying to implement, since the queue ref won't be the same for the application and IDE. I am trying to solve this by using the results Cluster itself as the Shared Variable and not yet fully successful with this.
I appreciate any help on this regard.
Thanks,
Saranya
12-03-2009 10:27 PM
12-04-2009 01:49 AM
Hello Saranya
Refnums are not valid in a different instance.
Shared variables support some buffering. This could replace a queue.
When you use datasocket VI you can wait for an update. This could replace an event.
Maybe this helps. There are topics about shared variables in the LabVIEW help.
Greetings
shb