To download NI software, including the products shown below, visit ni.com/downloads.
Part of the M Series Synchronization with LabVIEW and NI-DAQmx Example Set
When performing most multifunction synchronization, only a start trigger is needed. This is because the two operations derive their sample clocks from a common timebase internal to the device. In the LabVIEW example below that shows how to perform simultaneous analog voltage measurement and voltage generation, both analog operations derive their individual AI and AO sample clocks from the same internal 20 MHz or 100 kHz timebase inherent to the device. The operations will remain synchronous if given an identical rate. If the sample clock rates are set to different frequencies, the operations will be simultaneously started but not fully synchronized. Also note that the two operations can be configured to acquire different amounts of data.
Figure 1 Simultaneous Start Example
In the above example, there are two processes that occur concurrently. The top process controls the analog input and the bottom process controls the analog output. Each step, indicated by a number at the bottom of the figure, is described below.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.