Howdy all,

Here's my situation:
- I have some task that needs to be executed in parallel to the
currently running VI.  In fact, this task needs to executed in
parallel to a number of VIs,
so I've decided to build a sub-vi to handle this task.

- This task involves performing some processes every X number of
milliseconds (usually in multiples of 1000).  This task will be
performed until it receives a stop-command (the user generates this
signal - so I have no way of knowing when it will be)

- I still need to be able to handle user interaction with this main VI
while the task is executing, so my task must execute asynchronously.

- I want to be able to send a termination command to my asynchronously
executing task, and have it respond IMMEDIATELY (polling a global
variable is unnacceptable).
-------------------------------------------------------

The only way that I am aware of running a VI asynchronously is to
start it with the VI Server (either the Call by Reference Node, or the
Invoke Node).

Originally I planned on using notifiers to send commands to the
asynchronous VI.  Notifiers would have been perfect, because I could
break out of the waiting portion of the task as soon as I received the
command (this isn't really possible when polling a global).  Later I
found out that notifiers are not supposed to work with VIs loaded with
the VI Server.  My notifier approach worked fine during testing, but
wouldn't work when I compiled the program as an executable (which is
what the end product will be, so I need a new solution).

I'm about to change my implementation to use Queues instead of
notifiers, because I think I can achieve the same "Wait on
Notification" functionality with a queue, except I don't think there
is a restriction on using a Queue across the VI Server.

My Questions are:
Is there another way to get VIs to execute asynchronously OTHER than
the VI Server?

Is there a better way to communicate between them?  (I considered
using a User Event control, and generating the commands using that,
however I can't poll the status of the User Event without an Event
structure, preventing me from terminating my task once the user
generates the "end-task" request.

Does anybody else find the LabVIEW documentation to be frustratingly
lacking at times?

Any help, comments, or stories of similar situations would be
appreciated.

Reply via email to