Learn how to synchronize multiple C Series modules connected to the same FPGA. Find equations for calculating the time-to-first-sample and sampling guidance for supported delta-sigma modules with different data rates.

You can synchronize multiple modules that are connected to the same FPGA device when your application meets the following requirements:

  • The modules use the same master timebase source
  • The modules start acquisition mode at the same time
  • A single FPGA I/O Node function reads the synchronous data

Create FPGA I/O items for the module before you can configure the items using the FPGA I/O Node. Develop the FPGA VI to meet the guidelines described in the following table.

For delta-sigma modules, you must synchronize multiple sample rates.

Table 41. Synchronizing Multiple Sample Rates
Guideline Details
Share a master timebase source Configure the modules to share master timebase source.
Start the synchronized acquisition
  • Configure an FPGA I/O Node with Start channels for the module you want to synchronize.
  • Wire a Boolean constant set to TRUE to each Start channel.
  • Ensure that all I/O channels are in the same FPGA I/O Node. Otherwise, the FPGA I/O Node will not return synchronized data.
Acquire data from synchronized modules with the same data rate
  • Configure an FPGA I/O Node with all of the channels from which you want to synchronously sample.
  • Ensure that all I/O channels are in the same FPGA I/O Node. Otherwise, the FPGA I/O Node will not return synchronized data.
  • Refer to the Synchronizing NI 923x Modules (FPGA) VI in labview\examples\CompactRIO\Module Specific\NI 923x\Synchronizing NI 923x Modules\Synchronizing NI 923x Modules.lvproj for an example of synchronizing multiple modules with the same data rate.
Acquire data from synchronized modules with different data rates
  • If you synchronize modules that are configured for different data rates, create a separate loop for each data rate in the FPGA VI.
  • In each loop, configure an FPGA I/O Node with all of the channels that are configured for the data rate of that loop. If you place channels that are configured for different rates in the same loop, LabVIEW returns an overrun warning, error 65539, from the FPGA I/O Node when you run the VI.
  • A delay occurs before the FPGA I/O Node returns the first data point. The length of the delay depends on the data rate and model number of the module. The equation for the delay is provided in the following table.

Synchronizing Multiple NI 9231, NI 9250, and NI 9251 Modules

Use the following table to find the equation for synchronizing multiple sample rates for these modules:

  • NI 9231
  • NI 9250
  • NI 9251
Table 42. Equation for Synchronizing Multiple Sample Rates for the NI 9231, NI 9250, and NI 9251
Decimation Rate, m Clock Divider, n Time to First Sample (s)
32 n = 1 (281.625 * m * n + 5.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
64 n = 1 (281.625 * m * n + 8.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
128, ..., 1,024 n = 1 (281.625 * m * n + 6.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
32, ..., 1,024 n = 2, ..., 12 (281.625 * m * n + 5.5) * Master_Timebase_Period ± 1 Master_Timebase_Period

Synchronizing Multiple NI 9218, NI 9225, NI 9227, NI 9229, NI 9234, NI 9237, NI 9238, NI 9239, NI 9242, NI 9244, NI 9246, NI 9247 Modules

Use the following table to find the equation for synchronizing multiple sample rates for these modules:

  • NI 9218
  • NI 9225
  • NI 9227
  • NI 9229
  • NI 9234
  • NI 9237
  • NI 9238
  • NI 9239
  • NI 9242
  • NI 9244
  • NI 9246
  • NI 9247
Table 43. Equation for Synchronizing Multiple Sample Rates for the NI 9218, NI 9225, NI 9227, NI 9229, NI 9234, NI 9237, NI 9238, NI 9239, NI 9242, NI 9244, NI 9246, NI 9247
Decimation Rate, m Clock Divider, n Time to First Sample (s)
256 n = 1 (8.5 + n * 34,152) * Master_Timebase_Period
256 n = 2, ..., 31 (5.5 + n * 34,152) * Master_Timebase_Period
64 n = 1, ..., 31 77/Fs + 4-5 Master_Timebase_Period

Synchronizing Multiple NI 9230 and NI 9232 Modules

Use the following table to find the equation for synchronizing multiple sample rates for these modules:

  • NI 9230
  • NI 9232
Table 44. Equation for Synchronizing Multiple Sample Rates for the NI 9230 and NI 9232
Decimation Rate, m Clock Divider, n Time to First Sample (s)
128 n = 1, ..., 31 72/Fs + 4-5 Master_Timebase_Period
256 n = 1, ..., 31 68/Fs + 4-5 Master_Timebase_Period

Synchronizing Multiple NI 9235 and NI 9236 Modules

Use the following table to find the equation for synchronizing multiple sample rates for these modules:

  • NI 9235
  • NI 9236
Table 45. Equation for Synchronizing Multiple Sample Rates for the NI 9235 and NI 9236
Decimation Rate, m Clock Divider, n Time to First Sample (s)
512 n = 1, ..., 31 39/Fs + 110.5 MClk + 1 OClk + Analog Delay
  • The Master_Timebase_Period = period of the internal or external clock that the module uses (1/13.1072 MHz, 1/12.8 MHz, or 1/10 MHz)
  • Fs = sample rate. The divider and decimation rate depend on which sample rate you select

The module Specifications document provides an equation to help you determine the clock divider and decimation rate and/or lists the clock divider and decimation rate for each sample rate.

  • For example, the NI-9232 Specifications lists the decimation rate as 64 and clock divider as 1 when sampling at 102.4 kHz.
  • Using the equation in the NI-9218 Specifications, you can determine that the clock divider is 1 when the sample rate is 51.2 kHz. n = Master_Timebase_Frequency/256/fs [1]1 This is the equation provided in the NI-9218 Specifications reorganized to solve for n.

Synchronizing Multiple NI 9202 Modules

Use the following table to find the equation for synchronizing multiple sample rates for NI 9202 modules.

Table 46. Equation for Synchronizing Multiple Sample Rates for the NI 9202
Clock Divider, b Time to First Sample (s)
1 ((5.40625 + e) * a * b * c * d + 4.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
2, ..., 11 ((5.40625 + e) * a * b * c * d + 5.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
  • The Master_Timebase_Period = period of the internal or external clock that the module uses (1/13.1072 MHz, 1/12.8 MHz, or 1/10 MHz)
  • a = ADC Decimation Rate
  • b = Timebase Clock Divider
  • c = ADC Clock Divider
  • d = Filter Decimation Rate
  • e = Filter Frequency
    • 0 for notch at Fs
    • 1 for notch at Fs/2
    • 3 for notch at Fs/4
    • 7 for notch at Fs/8
    • 15 for notch at Fs/16

Refer to the NI-9202 Specifications for the values of a, b, c, and d for each sample rate.

Synchronizing Multiple NI 9252 and NI 9253 Modules

Use the following table to find the equation for synchronizing multiple sample rates for these modules:

  • NI 9252
  • NI 9253
Table 47. Equation for Synchronizing Multiple Sample Rates for the NI 9252 and NI 9253
Filter Clock Divider, n Time to First Sample (s)
Comb 2 ((5.40625 + b) * 128 * a + 8.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
Comb Others ((5.40625 + b) * 128 * a + 8.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
Butterworth 2 (5.40625 * 128 * a + 5.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
Butterworth Others (5.40625 * 128 * a + 5.5) * Master_Timebase_Period ± 1 Master_Timebase_Period
  • The Master_Timebase_Period = period of the internal or external clock that the module uses (1/13.1072 MHz, 1/12.8 MHz, or 1/10 MHz)
  • a = Decimation Rate
  • b = Filter Frequency
    • 0 for Filter Frequency—1 (notch at Fs)
    • 1 for Filter Frequency—2 (notch at Fs/2)
    • 3 for Filter Frequency—3 (notch at Fs/4)
    • 7 for Filter Frequency—4 (notch at Fs/8)
    • 15 for Filter Frequency—5 and 6 (notch at Fs/16)

Refer to the NI 9252 Specifications and NI 9253 Specifications for the values of (Decimation Rate) a for each sample rate.

1 This is the equation provided in the NI-9218 Specifications reorganized to solve for n.