Using Signal-Based Synchronization in NI-Sync
Signal-based synchronization is characterized by physically sharing a combination of clocks and triggers to synchronize data acquisition and instrument control. Using a signal-based synchronization method, you can route clock and trigger signals throughout the system with niSync Connect Clock Terminals and niSync Connect Trigger Terminals. Once you connect clock and trigger terminals, the signals are used to synchronize devices and modules using the terminal routes you established.
Using the signal-based synchronization method, you can perform the following actions:
- Generate a clock that runs at user-defined frequency.
- Use triggers to synchronize data acquisition.
- Divide a clock to create new frequencies that are still synchronized with the main clock.
- Route clock and trigger terminals between devices using niSync Connect Clock Terminals and niSync Connect Trigger Terminals.
- Lock the backplane clock to an external device's clock using the PLL circuit.
- Discipline the backplane clock to a module's oscillator.
- Measure the frequency on a specific terminal using niSync Measure Frequency.
The clock signal(s) used to synchronize devices in the signal-based synchronization method can originate from an external clock connected to ClkIn, a DDS signal created with a signal-based timing and synchronization module, the backplane clock of a PXI or PXIe chassis, or the oscillator of the NI-Sync device.
Signal-Based Synchronization Phases
The signal-based synchronization method can be broken down into the following phases:
- Initialize—Create an NI-Sync session to establish communication with an NI signal-based timing and synchronization device. The niSync Initialize VI creates a unique session handle that identifies the device to subsequent NI-Sync nodes. You can also use niSync Initialize to reset the device to a known state and verify that the NI-Sync instrument driver is valid for the device.
- Configure Hardware—Set up your device for synchronization, typically using the niSync Property Node. You can choose the type of signal to generate or synchronize with, the frequency of the signal (if you are using DDS), and the synchronization clock the front and rear zones of your chassis should use.
- Connect Terminals—Connect clock and trigger terminals between modules and chassis. Use this step to route triggers to different parts of the chassis and synchronize modules to the same clock signal. During the Connect Terminals phase, you can connect source and destination terminals, set a synchronization clock for triggers, and discipline the backplane clock to a clock signal. You can use the niSync Connect Clock Terminals, niSync Connect Trigger Terminals, and niSync Connect Software Trigger VIs in the Connect Terminals phase.
- Configure and Perform Measurement—Begin data acquisition using the parameters you set in the Configure Hardware phase and the terminal routes you created in the Connect Terminals phases. Taking a measurement is an application-specific operation that usually involves the use of a separate API, such as NI-DAQmx. You can also return synchronization information using the niSync Property Node or send a software trigger using niSync Send Software Trigger in this phase.
- Disconnect Terminals—Disconnect the terminal routes you set up in the Connect Terminals phase. Once you disconnect terminals, they are free for use in other applications. You can use the niSync Disconnect Clock Terminals, niSync Disconnect Trigger Terminals, and niSync Disconnect Software Trigger VIs in this phase.
- Close—Close the NI-Sync session and end communication between the driver and your device using niSync Close. This phase is necessary for deallocating memory and freeing other operating system resources. You must close every NI-Sync session you initialize, even if an error occurs when you execute the program.
Signal-Based Advanced and Utility Functions
Functions and VIs that do not fall into the above signal-based synchronization phases are considered Advanced or Utility functions. You can access the Advanced palette by selecting NI-Sync»Advanced from the Functions palette, and the Utility palette by selecting NI-Sync»Utility.