LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need some help with Events

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

0 Kudos
Message 1 of 5
(2,802 Views)
How are you opening the VIs in the LabVIEW IDE "forcefully"? Also, how do the test VIs get the event references?
0 Kudos
Message 2 of 5
(2,772 Views)

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

0 Kudos
Message 3 of 5
(2,740 Views)
What is the debug mode you are trying to implement? could you post the vi?
Shreyas Hebbare
Shreyas Technologies
India
0 Kudos
Message 4 of 5
(2,714 Views)

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

0 Kudos
Message 5 of 5
(2,699 Views)