Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

low latency multiple serial read

Solved!
Go to solution

Thanks, here's what I've got:

 

1. Yes, only one PXI-8430/16 board.

2. MAX says I have NI-Serial RT 3.3.4

3. Yes, all the serial ports get opened at VI initialization, and they all go into a while loop. "Dummy" just means that they have no physical device hooked up to the DB9 connector, and therefore they should be in a permanent waiting state (until they timeout and start over).  But the VISA settings are all configured as they would be once I get my hands on the instrument hardware.

4. Above normal priority in the 'instrument' classification.  The handlers are the only thing running in this classification. This should be reflected in the realtime trace screenshot above.

 

 

 

thanks for looking into this.

0 Kudos
Message 11 of 13
(1,737 Views)
Solution
Accepted by topic author gregoryng

Hi,

 

When LabVIEW performs asynchronous IO the executing thread is free to do other work; however the thread will periodically poll to see if IO is finished.  Since the "dummy" serial ports are open and attempting to read asynchronously, they will generate this extra polling that will likely increase your jitter.  The more ports you add, the more often this polling action will happen. Using synchronous IO is much better because there is no polling that will happen during IO.  Synchronous IO will give you the best performance regarding jitter.  However it will block a thread while IO is being performed.   If you attempt to use all 16 ports with synchronous VIs at the same time on the same priority and execution system, some of them will block because only a limited number of threads are available. You can attempt to move some of the VIs that use serial ports to execute on another execution system.  This will require you to make separate subVIs for each execution system and for your application we would recommend that you limit that to 4 ports per executions system. To change between asynchronous and synchronous IO, find all of the VISA Read and VISA Write VIs, right-click them, and select Synchronous I/O Mode>>Synchronous. 

To change the execution system of a VI, go to the VI properties, select Execution from the Category drop-down box, choose a execution system from the Preferred Execution System drop-down box.

 

Hope this helps!

Matt
Applications Engineer
National Instruments
Message 12 of 13
(1,650 Views)

Thanks, Matt.  The description from the first part matches my observations from the real-time trace, so good to see that confirmed.

 

Your suggestion of moving threads to various execution systems should give us enough flexibility to control the jitter as well as possible.

 

So between the 'theoretical' explanation and the practical suggestion, I think this is a great answer.

0 Kudos
Message 13 of 13
(1,645 Views)