What Is the SCANCLK Signal, and How Do I Use It?

Updated Jun 27, 2019

Issue Details

  • What is SCANCLK?
  • What cards use the SCANCLK signal?
  • How can I activate and use SCANCLK?

Solution

The SCANCLK signal can be found on all E Series boards and the 611x boards as pin 46. The main purpose of this signal is to provide a method of synchronization with the SCXI bus. Each pulse of the SCANCLK signal represents the end of an A/D conversion on the DAQ board. Since the signal pulses on every A/D conversion, the name can be misleading because one scan could include multiple A/D conversions if multiple channels are included in the scan. Keep in mind also that the output doesn’t actually represent an accurate rendition of either the Scan Clock or the Channel Clock. This is because the leading edge of the pulse, which is generated on the SCANCLK pin, occurs 50ns to 100ns after an A/D conversion has begun and has a pulse width of 450ns.

The START_SCAN signal is much more suitable as an accurate rendition of the Scan Clock. The SCANCLK signal is useful only if you are synchronizing an instrument with the A/D conversions of your DAQ board.

How do I activate and use the SCANCLK signal?
The SCANCLK signal is activated by default for any SCXI acquisition. For all other acquisitions, the SCANCLK signal is turned off by default.

LabVIEW:
The SCANCLK signal can be activated by using the Route Signal VI found in Functions>>Data Acquisition>>Calibration and Configuration. You can use this VI after configuring your channels and before you initiate the acquisition. Create constants for the Signal Name and Signal Source inputs, and select “SCANCLK” for each input. This will activate the SCANCLK output.

Traditional NI-DAQ (Legacy) Function Calls:
If you are using DAQ function calls to perform your data acquisition, then you must use the Select_Signal() function in order to activate the SCANCLK signal.

The Select_Signal() function must be placed somewhere before the acquisition is initiated in your code. The two constants that are used for SCANCLK are ND_SCANCLK, and ND_SCANCLK_LINE. The syntax of your code will look like the following:

iStatus = Select_Signal(iDevice, ND_SCANCLK_LINE, ND_SCANCLK, ND_LOW_TO_HIGH);

You can also de-activate the SCANCLK signal by using the following function:

iStatus = Select_Signal(iDevice, ND_SCANCLK_LINE, ND_NONE, ND_DONT_CARE);

Extra SCANCLK pulses during a finite acquisition
During an acquisition with a finite number of scans, the total number of pulses on the SCANCLK output will usually be greater than the number of scans that were acquired. On a typical E Series board, you will usually see about 2 extra pulses, and on the SMIO boards you will probably see around 4 extra pulses. These extra pulses simply represent the extra A/D conversions that take place on any scan.

SCANCLK on the SMIO boards (611x)
These boards do not have a channel clock associated with them, so the SCANCLK signal will more closely represent the actual scan clock than the E Series SCANCLK signal. Since each channel on these boards are sampled simultaneously on separate A/D converters, the SCANCLK will be updated once every scan, regardless of how many channels are being scanned.