There are two ways to use an external clock to set the sample clock of an NI Waveform Generator card.
Reference Clock Synchronization :
- External Clock is routed to on board PLL circuit through PFI connector on the Waveform generator front panel. This is used as reference to generate the sample clock used by the card.
- This is implemented in LabVIEW using the niFgen Configure Reference Clock VI.
- Reference clock frequency can only take certain values mentioned in the specification sheet. The generated clock is synchronized in frequency with external clock.
- The generated clock has a constant phase difference with external clock which is expected with a PLL circuit. However, this phase difference is:
- Variable across runs with the same setup if generation is not triggered by the external clock. The delay is caused by PLL locking time which is variable and is estimated in the specification sheet.
- Constant though multiple runs with the same setup if generation is triggered by the external clock. This delay is caused by the circuitry between the trigger input terminal and generation terminal. It is also dependent on sample clock frequency and is estimated in the specification sheet.
External Sample Clock Synchronization :
- External clock is routed directly to the waveform generation engine and DAC. There is no PLL circuit in between and the card uses the external clock directly as the sample clock. No new clock is generated.
- This is Implemented in LabVIEW using the niFGen Configure Sample Clock Source VI followed by niFGen Set Sample Rate VI.
- A constant phase difference between the external clock and sample clock is still present. This delay is caused by the circuitry between the sample clock input terminal and the generation terminal.
- The behavior is such, irrespective of whether triggering has been used or not.
- This clock mode allows only arbitrary waveform or arbitrary sequence mode.
Examples demonstrating these features are present in the example finder in the Hardware Input and Output -> Modular Instruments -> NI-FGEN
- Clocking diagrams of various waveform generator cards such as for the PXIe-5442 card are present in NI Signal Generators help document under the devices section and are helpful in understanding signal paths.
- The niFgen Adjust Sample Clock Relative Delay VI can be used to offset the clock by a certain amount. This can help in elimination of the constant phase delays if any.