Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Time loops in Real Time Environment

A time loop does one processes at a time. While a while loop do more than one process simultaneously (depending on if machine has multiple core processor)? 

 

 

Would it be possible to put a time loop inside a while loop on RT machine (specifically NI cRio-9076)?  I want to do a state machine with event based timing (see attachment) or state with periodic timing (see attachment).

 

 

The state that contains the time loop will be used to acquire data. Thus it will be deterministic.

 

 

Can someone tell me if this is doable?  

 

-Would I have to change the priority on the while loop to 100?

 

Thanks alot.  

 

*Also i am using the RIO Scan Interface 

Download All
0 Kudos
Message 1 of 2
(4,776 Views)

Hi sticyfinger

 

I might recommend you to have the acquisition loop separated from the event based timing, using for example a producer/consumer structure. In this case the producer could manage the events and the second loop a timed loop.

 

Timed Loop - LabVIEW 2012 Help

Application Design Patterns: Producer/Consumer

 

 

Keep in mind that if we are communicating a deterministic loop with a non deterministic loop we might have to use a RT FIFO instead of a queue and that we might need to set a timed out to dequeue elements from the RT FIFO.

 

It is not recommended to use nested while loops or timed loops

 

Regards

Esteban Rivel

0 Kudos
Message 2 of 2
(4,751 Views)