Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

timed loops producer / consumer with TCP read

I have two whiles loops in a producer / consumer arrangement, which I'd like to replace with timed loops in order to use dual processors and raise the tasks priority in the PC. The producer reads data from the TCP port and queues it. The consumer reads the queue and does RT calculations. I am using this setup to provide a buffer should anything cause latency in the producing network, and am using the 'elements on the queue' as an indicator of changing latency. Data is being read at 80-200Hz, with plans to increase it to kHz.

 

I've tried the timed loops but they don't work so well. There are many options and these loops are new to me, so I'd be grateful for some suggestions.

 

 

 

0 Kudos
Message 1 of 2
(3,501 Views)

Timed Loops can be problematic with multicore, I guess they are trying to fix this, this patch http://joule.ni.com/nidu/cds/view/p/lang/en/id/1048 is available for version 8.5.1, check it out,

...remedy can be; replace Timed Loop with a normal While loop inside a Timed Sequence, and perform your core controls on the Timed Sequence.

 

Good Luck.

Sia

0 Kudos
Message 2 of 2
(3,484 Views)