The PXI platform is ideal for synchronizing multiple Modular Instruments for performing High Speed Acquisition where all measurements start at the same time. NI-Tclk is a feature of the PXI platform that ensures all cards are armed and synchronized to start on the same start trigger. Many NI Modular Instruments for PXI and PXIe support NI-Tclk.
One example of where this tool can be used is when working with NI HSDIO (High Speed Digital Input Output) devices, such as the PXI-6561 (8MB/ch). This example code synchronizes multiple PXI-6561 cards, to simultaneously acquire from 16 inputs. The acquired digital data is written direcly to multiple Binary Files. Each card writes to its own Binary File.
Due to the large amount of data that will be transferred from the cards to the PXI backplane several design considerations have been implemented:
- The PXI backplane is based on PCI, which has a combined maximum rate of 132MB/s.
- HSDIO acquisition rates could produce more data per second than a standard hard drive can write.
- Producer/Consumer architecture acquires data at a different rate to writing to file.
- Producer Loop runs at the rate of the HSDIO card.
- Consumer Loop runs slower as it's writing to file. The Consumer Loop will not slow down the Producer.
- Data is passed from the Producer to the Consumer via a Queue, which is capped by the amount of available RAM in the PXI controller.
- Less RAM will be used if the data can be written to the file as quickly as possible.
Therefore:
- PCs can write to Binary Files with the least overhead.
- Almost all hard drive vendors have a sector size of 512Bytes, which means that writing a multiple of 512Bytes per iteration improves write speed.
- For 16 channels per HSDIO card, the VI should fetch the data as an Array of I16s.
- The number of Fetches (in Bytes) per Cycle should be a multiple of 512Bytes, to aid writing to file.
- Separate Binary Files per card ensures that this example is more scalable for 2 or more cards, rather than a fixed number.
Additional documentation is found in the Block Diagram and Context Help of the VI.

George T.
Senior Applications Engineer
National Instruments UK and Ireland