08-13-2010 12:40 PM
I have a several loops runnig in parallel, However I want some of them be be "activated" by other.
Lets say loop A detects a task that has to be executed by loop B. I want the loop B to wait on hold without using CPU time or delays and to start immediately after loop A said so. When the task is done loop B waits for another call. In the mean time loop A goes on no matter what. This will be done many times a second under RT.
I do not want this to be a subroutine, I do not want it to use while do with a delay. What are my best options. I was thinking about event and FIFOs. I appreciate any suggestions.
I am looking for something like the Linux/C select function. thanks
08-13-2010 01:20 PM - edited 08-13-2010 01:21 PM
I'm not sure what is available with real time. Would notifiers work?
08-14-2010 01:13 PM
Notifers or queues will work using a basic producer/consumer architecture across multiple VIs.
Take a look at the Asynchronous Message Communication Reference Design and the Queued Message Handler design pattern included there.
08-26-2010 12:09 PM
I used notifiers under rt and it works.
I am still loking for a feature like a shared memory from linux. Anything can write to it and anything can read it, any time. It is a kind of system status - set of variables that describe the current situation. I would like to be able to have an instant accest to it any time. I am using local variables now - it is within same vi - just independednt loops.
08-26-2010 02:43 PM
Andy, Maybe and Action engine would suffice? See here
Hope this helps.