NI-HSDIO C Function Reference

niHSDIO_ConfigureInitialState

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

ViStatus = niHSDIO_ConfigureInitialState ( ViSession vi, ViConstString channelList, ViConstString initialState);

Purpose

Sets the Initial state for a dynamic generation operation. The Initial state of each channel is driven after the session is initiated using the niHSDIO_Initiate function. Channels remain unchanged until the Start trigger generates the first waveform sample.

Valid Syntax:

Both of these examples are valid and do the same thing. The order of channelList determines the order of the pattern string.

  • niHSDIO_ConfigureInitialState (vi, "19-0", "0000 0XXX XX11 111Z ZZZZ");
  • niHSDIO_ConfigureInitialState (vi, "0-19", "ZZZZ Z111 11XX XXX0 0000");

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 Specifies which channels have their initial value set using the initialState string. The order of channels in channelList determines the order of the initialState string.
Initial State ViConstString Describes the Initial state of a dynamic generation operation. This expression is composed of characters:
  • 'X' or 'x': keeps the previous value
  • '1': sets the channel to logic high
  • '0': sets the channel to logic low
  • 'Z' or 'z': disables the channel or sets it to high-impedance
Note  NI 656x devices do not support the high-impedance (Z) Initial state.
The first character in the expression corresponds to the first channel in channelList. The number of characters in pattern must equal the number of channels specified in channelList or an error is returned.

The default state of a channel is to keep the previous value.

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