DAQmxCreateAIVoltageChanWithExcit
int32 DAQmxCreateAIVoltageChanWithExcit (TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, float64 minVal, float64 maxVal, int32 units, int32 bridgeConfig, int32 voltageExcitSource, float64 voltageExcitVal, bool32 useExcitForScaling, const char customScaleName[]);
Purpose
Creates channel(s) to measure voltage and adds the channels to the task you specify with taskHandle. Use this instance for custom sensors that require excitation. You can choose to use the excitation to scale the measurement.
Parameters
Input
|
Name |
Type |
Description |
taskHandle
|
TaskHandle |
The task to which to add the channels that this function creates. |
physicalChannel
|
const char []
|
The names of the physical channels to use to create virtual channels. You can specify a list or range of physical channels. |
nameToAssignToChannel
|
const char []
|
The name(s) to assign to the created virtual channel(s). If you do not specify a name, NI-DAQmx uses the physical channel name as the virtual channel name. If you specify your own names for nameToAssignToChannel, you must use the names when you refer to these channels in other NI-DAQmx functions.
If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. If you provide fewer names than the number of virtual channels you create, NI-DAQmx automatically assigns names to the virtual channels. |
terminalConfig
|
int32 |
The input terminal configuration for the channel.
|
minVal
|
float64 |
The minimum value, in units, that you expect to measure. |
maxVal
|
float64 |
The maximum value, in units, that you expect to measure. |
units
|
int32 |
The units to use to return the voltage measurements.
Name |
|
Description |
DAQmx_Val_Volts
|
|
volts |
DAQmx_Val_FromCustomScale
|
|
Units a custom scale specifies. Use customScaleName to specify a custom scale. |
|
bridgeConfig
|
int32 |
The type of Wheatstone bridge the sensor is.
Value |
|
Description |
DAQmx_Val_FullBridge
|
|
Sensor is a full bridge. If you set useExcitForScaling to TRUE, NI-DAQmx divides the measurement by the excitation value. Many sensors scale data to native units using scaling of volts per excitation. |
DAQmx_Val_HalfBridge
|
|
Sensor is a half bridge. If you set useExcitForScaling to TRUE, NI-DAQmx divides the measurement by the excitation value. Many sensors scale data to native units using scaling of volts per excitation. |
DAQmx_Val_QuarterBridge
|
|
Sensor is a quarter bridge. If you set useExcitForScaling to TRUE, NI-DAQmx divides the measurement by the excitation value. Many sensors scale data to native units using scaling of volts per excitation. |
DAQmx_Val_NoBridge
|
|
Sensor is not a Wheatstone bridge. |
|
voltageExcitSource
|
int32 |
The source of excitation.
Value |
|
Description |
DAQmx_Val_Internal
|
|
Use the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation. |
DAQmx_Val_External
|
|
Use an excitation source other than the built-in excitation source of the device. You must use voltageExcitVal to specify the amount of excitation. |
DAQmx_Val_None
|
|
Supply no excitation to the channel. You cannot use this value if the sensor requires excitation. |
|
voltageExcitVal
|
float64 |
The amount of excitation, in volts, that the sensor requires. |
useExcitForScaling
|
bool32 |
Specifies whether NI-DAQmx divides the measurement by the excitation. You should typically set useExcitForScaling to TRUE for ratiometric transducers. If you set useExcitForScaling to TRUE, set maxVal and minVal to reflect the scaling.
For example, if you expect to acquire a voltage between -5 and 5, and you use an excitation of .10 volts to scale the measurement, set minVal to -50 and set maxVal to 50. If you set bridgeConfig to DAQmx_Val_NoBridge, useExcitForScaling has no effect on the measurement. |
customScaleName
|
const char []
|
The name of a custom scale to apply to the channel. To use this parameter, you must set units to DAQmx_Val_FromCustomScale. If you do not set units to DAQmx_Val_FromCustomScale, you must set customScaleName to 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. |