Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

asynchronous communication between loops - looing for a suggestion

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

0 Kudos
Message 1 of 5
(3,514 Views)

I'm not sure what is available with real time. Would notifiers work?

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 2 of 5
(3,513 Views)

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.

 

http://zone.ni.com/devzone/cda/epd/p/id/6091

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 3 of 5
(3,495 Views)

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.

0 Kudos
Message 4 of 5
(3,435 Views)

Andy, Maybe and Action engine would suffice? See here

 

Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 5 of 5
(3,431 Views)