ni.com checkout is currently experiencing issues.

Support teams are actively working on the resolution.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
jcase

Integrate Asynchronous Call By Reference with Event Structure

Status: New

In LV 2011, an asynchronous Call By Reference feature was added to LV. This feature added two new nodes:

 

    • Start Asynchronous Call
    • Wait On Asynchronous Call

It would be nice if there was a way to use the LV event structure to wait for the results of an async call. For example:

EventStructureIntegration.png

 

I am not necessarily  proposing this is the way to integrate the ACBR with the event structure, it is just one suggestion. Instead, I hope this idea can gage the amount of interest in some sort of event structure integration. If anyone has any better ideas or suggestions, please say so in the comment.

4 Comments
JackDunaway
Trusted Enthusiast

+1 for an event handler capable of registering for "Call Complete" events for asynchronous calls! Throwing out another idea (originally posted on Beta forum) with a few modifications from the above diagram, notably focusing on minimizing syntax:

 

  1. Integrated outputs into the Event Data Node of the Event Structure
  2. Async VI Ref is wired directly into Register For Events node, rather than into Create User Event
  3. "Start" serialized after "Register" to avoid race (semantics Smiley Wink Smiley Very Happy )

A mistake in the diagram below is that "UsrEvtRef" on Event Data Node should be "VI Ref". 

 

SubVIOutputCallback2.png

AristosQueue (NI)
NI Employee (retired)

Go further... make a "VI Run Complete" event that fires when any VI finishes running. Registering for that could be done on any VI, regardless of how it is launched. Since the registration node would indicate interest in catching the results, it eliminates the need for the 0x100 bit on Open VI Reference.

David S.
NI Employee (retired)

I can't give kudos to this idea until event FIFO management functions (flush, peek, reprioritize, filter multiples, etc.) are added to the API. Until then, events are too risky to mess with; I'll use a queue or notifier whenever I can, instead.

David Staab, CLA
Staff Systems Engineer
National Instruments
Intaris
Proven Zealot

Oh yes please!