NI-HSDIO C Function Reference

niHSDIO_WriteStaticU32

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

ViStatus = niHSDIO_WriteStaticU32 ( ViSession vi, ViUInt32 writeData, ViUInt32 channelMask);

Purpose

This function writes to channels configured for static generation. You can configure a channel for static generation using the niHSDIO_AssignStaticChannels function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi was obtained from the niHSDIO_InitAcquisitionSession or niHSDIO_InitGenerationSession function.
writeData ViUInt32 Specifies the bit-value of data written from PFI channels configured for static acquisition.

The least significant bit of writeData corresponds to the lowest physical channel number. For example, bit 0 corresponds to PFI0, and bit 31 corresponds to PFI31, if that channel exists on the hardware.

If witedData returns a value of 0x000F, channels PFI0 to PFI3 are logic one and the remaining channels are logic zero or are not configured for static acquisition.

If readData returns a value of 0xFF00 0000, channels PFI24 to PFI31 are logic one and the remaining channels are zero or are not configured for acquisition.

channelMask ViUInt32 Specifies the bit-value of channels to leave unchanged. 1 means to change the channel to whatever is reflected by writeData. 0 means do not alter the channel, regardless of writeData.

The least significant bit of channelMask corresponds to the lowest physical channel number (for example, writeData of 0xFFFF and channelMask of 0x0080 means set only channels 0-7 to 1; all other channels remain unchanged).

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

Related topics:

Log in to get a better experience