The asynchronous Call By Reference feature allows you to start multiple asynchronous calls simultaneously using one reference. However, when doing this, it is not always possible for the Wait On Asynchronous Call node to know which call to Start Asynchronous Call it is handling. This is especially common when the Open VI Ref option 0x40 is used to enable simultaneous calls on reentrant VIs using one reference.
There are currently two ways to know at a Wait node who started the call:
-
Use a unique VI reference for each asynchronous call -- The problem with this approach opening and managing multiple references is more expensive than making multiple calls on one VI ref. (Note that the VI ref can be reused for another async call after a user has finished handling the Wait.)
-
Create a unique ID and pass it to and from the target VI. -- The problem with this approach is the target VIs interface needs to be updated to accept a unique ID and return the same unique ID.
Neither of these are ideal.
I propose the Start Async Call and Wait On Async Call nodes themselves return a unique call ID. This unique ID could be used to programmatically determine which call to Start and Wait match.
Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.