DAQmxSetAnalogPowerUpStates

NI-DAQmx C Functions

DAQmxSetAnalogPowerUpStates

int32 DAQmxSetAnalogPowerUpStates (const char deviceName[], const char channelNames[], float64 state, int32 channelType, ...);

Purpose

Updates the states that analog physical channels on a device are set to when the device powers up or when the device is reset. Power-up states are stored in EEPROMs that you can write to only a limited number of times. Therefore, you should use this function as infrequently as possible. This function writes to the EEPROM only if a setting you request is different from the one currently stored on the EEPROM. This function writes power-up states in sequential order. Therefore, if a physical channel has multiple entries, the last entry is used.

Parameters

Input
Name Type Description
deviceName const char [] The name of the device, as configured in Measurement & Automation Explorer (MAX), to which this operation applies.
channelNames const char [] The physical channel to modify. You can specify a list or range of channels.
state float64 The power-up state to set for the channel(s) in channelNames.
channelType int32 The channel type for the channel(s) in channelNames.
Value Description
DAQmx_Val_ChannelVoltage Voltage output. You can set voltage power-up states only for physical channels that support voltage output.
DAQmx_Val_ChannelCurrent Current output. You can set current power-up states only for physical channels that support current output.
moreChannelsStatesAndTypes any type (passed by value) Combinations of additional channels and states and types to set the channels to when the device powers up or when the device is reset. You must pass NULL at the end of the argument list.
If you do not want to pass additional channels and states, the function call can be similar to the following example:
DAQmxSetAnalogPowerUpStates ("Dev1", "Dev1/ao0", 0.0, DAQmx_Val_ChannelVoltage, NULL);
If you pass additional channels and states, the function call can be similar to the following example:
DAQmxSetAnalogPowerUpStates ("Dev1", "Dev1/ao0", 0.0, DAQmx_Val_ChannelVoltage, "Dev1/ao1", 1.0, DAQmx_Val_ChannelCurrent, NULL);

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.