Solution
The following describes the general approaches on how to calculate the expected sample rate:
For
Analog Input tasks:
- X = Sample Clock Timebase / Specified Sample Rate
- Round X down to the next integer value.
- Actual Sample Clock = Sample Clock Timebase / X
For example,
- 20 MHz / 17545 Hz = 1139.93
- 1139.93 rounded down is 1139.
- 20MHz / 1139 = 17559.26 Hz
Thus, 17559.26 Hz is the actual sample clock rate for the analog input task.
For Analog Output tasks and Digital I/O:
- X = Sample Clock Timebase / Specified Sample Rate
- Round X to the nearest integer value (up or down).
- Actual Sample Clock = Sample Clock Timebase / X
So, for the example given:
- 20 MHz / 17545 Hz = 1139.93
- 1139.93 is rounded up to 1140.
- 20 MHz / 1140 = 17543.86 Hz
Thus, 17543.86 is the actual sample rate for the analog output or digital task