NI-HSDIO C Function Reference

niHSDIO_ConfigureDataPositionDelay

  • Updated2023-02-21
  • 2 minute(s) read

ViStatus = niHSDIO_ConfigureDataPositionDelay ( ViSession vi, ViConstString channelList, ViReal64 delay);

Purpose

Sets up the data delay with respect to the Sample clock. To configure the data delay, select NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE as the value for the position parameter of the niHSDIO_ConfigureDataPosition function.

Note  On NI 6555/6556 devices, you can configure data position delay on a per channel basis.
Note Note  To configure a delay on NI 656x devices, you must delay all channels on the device. NI-HSDIO returns an error if you apply a delay to only a partial channel list.

The NI 6547/6548 supports multibank data delay. All channels configured to NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE and assigned to the same data delay bank must share a data delay value, even if channels on that bank are configured to NIHSDIO_VAL_SAMPLE_CLOCK_RISING_EDGE or NIHSDIO_VAL_SAMPLE_CLOCK_FALLING_EDGE. NI-HSDIO returns an error if you set different delay values for two channels within the same bank.

The following table shows which channels belong to each bank:

Channels0-34-78-1112-1516-1920-2324-2728-31PFI 0-3
Bank #012201200
Notes  DDR and extended data states do not change the bank assignments.

Related topics:

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi was obtained from the niHSDIO_InitAcquisitionSession or niHSDIO_InitGenerationSession function.
Channel List ViConstString Identifies channels to apply settings. Use "" or VI_NULL to specify all channels.
Delay ViReal64 Specifies the delay after the Sample clock rising edge when the device generates or acquires a new data sample. Data delay is expressed as a fraction of the clock period, that is, a fraction of 1/NIHSDIO_ATTR_SAMPLE_CLOCK_RATE. All the channels in the session that use the NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE data position must have the same delay value. This attribute is valid only when the position parameter of the niHSDIO_ConfigureDataPosition function is set to NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE for these channels.

Return Value

Name Type Description
Status ViStatus

Reports the status of this operation. To obtain a text description of the status code, call the niHSDIO_error_message function. To obtain additional information concerning the error condition, use the niHSDIO_GetError and niHSDIO_ClearError functions.

The general meaning of the status code is as follows:

Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

Log in to get a better experience