Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial jitter

Hello,

 

I want to send serial data via RS485 port every 2ms on PXI 8433 board with 8106 controller.  Baud rate: 2Mbit.

 

I used timed loop with loop period is 2ms. I monitored loop time intervals with a chart. When I send 8 byte data it causes to jitter and loop time increases to any value between 12-40ms with nearly 500- 800ms time intervals.

 

But when I send 7 byte data loop continously run without jitter.

 

I changed Baud Rate, transmiter buffer size, increased looptime up to 10ms, sometimes jitter interval or loop time changed but never run exact time intervals which I set.

 

Why this problem has occured? I appended sample project file and JPEG images of 7Byte and 8Byte looptime charts.

 

Thanks. 

 

 

 

 

0 Kudos
Message 1 of 2
(4,062 Views)

To reduce jitter on the system the serial I/O relies on a worker thread that is below timed loop priority. When using asynchronous reads and writes the timed loop can actually starve this thread, causing the I/O to be slow. 

 

You can try to work around this by switching the VISA reads and writes to synchronous. This is done by right-clicking on the read/write on the block diagram and deselecting the asynchronous option. The tradeoff is that one of your threads will be tied up with the serial I/O, and won't be available to do other things until the I/O complete.

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