NI-HSDIO C Function Reference

niHSDIO_ConfigureDataPosition

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

ViStatus = niHSDIO_ConfigureDataPosition ( ViSession vi, ViConstString channelList, ViInt32 position);

Purpose

Sets up channels to be clocked in various ways by the Sample clock edges. You have three options for data position: rising edge, falling edge, or delayed.

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.
Position ViInt32 Specifies which edge of the Sample clock signal times the operation. You can also configure the device to generate data at a configurable delay past each rising edge of the Sample clock. This attribute is valid only when the position parameter of this function is set to NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE for these channels.

Defined Values

NIHSDIO_VAL_SAMPLE_CLOCK_RISING_EDGE (18)—The device samples or generates data on the rising edge of the Sample clock.
NIHSDIO_VAL_SAMPLE_CLOCK_FALLING_EDGE (19)—The device samples or generates data on the falling edge of the Sample clock.
NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE (20)—The device samples or generates data with a delay from the rising edge of the Sample clock. Specify the delay using the NIHSDIO_ATTR_DATA_POSITION_DELAY attribute or the niHSDIO_ConfigureDataPositionDelay function.
Notes  NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE has more jitter than the rising or falling edge values.
Certain devices have Sample clock frequency limitations when a custom delay is used. Refer to the device documentation for details.
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 6544/6545/6547/6548 supports multibank data delay. Refer to the NIHSDIO_ATTR_DATA_POSITION_DELAY attribute for more information about multibank data delay.

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