Creates channel(s) that use an accelerometer to measure acceleration and adds the channel(s) to the task you specify with taskHandle.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 acceleration measurements from the channel.
Name
Description
DAQmx_Val_AccelUnit_g
G-force (g). 1 g is approximately equal to 9.81 m/s2.
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
sensitivity
float64
The sensitivity of the sensor. This value is in the units you specify with the sensitivityUnits input. Refer to the sensor documentation to determine this value.
sensitivityUnits
int32
The units of sensitivity.
Name
Description
DAQmx_Val_mVoltsPerG
mVolts/g.
DAQmx_Val_VoltsPerG
Volts/g.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) to measure acceleration. Use this function for custom sensors that require excitation. You can use the excitation to scale the measurement.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 from the channel.
Value
Description
DAQmx_Val_FromCustomScale
Units a custom scale specifies. If you select this value, you must specify a custom scale name.
DAQmx_Val_g
Grams
DAQmx_Val_MetersPerSecondSquared
Meters per second squared
DAQmx_Val_InchesPerSecondSquared
Inches per second squared
sensitivity
float64
The sensitivity of the sensor. This value is in the units you specify with the sensitivityUnits input. Refer to the sensor documentation to determine this value.
sensitivityUnits
int32
The units of sensitivity.
Name
Description
DAQmx_Val_mVoltsPerG
Millivolts per gram
DAQmx_Val_VoltsPerG
Volts per gram
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
useExcitForScaling
bool32
Whether the excitation voltage will be used to scale the returned data
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.
Creates channel(s) that use a charge-based sensor to measure acceleration.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 from the channel.
Value
Description
DAQmx_Val_FromCustomScale
Units a custom scale specifies. If you select this value, you must specify a custom scale name.
DAQmx_Val_AccelUnit_g
Grams
DAQmx_Val_MetersPerSecondSquared
Meters per second squared
DAQmx_Val_InchesPerSecondSquared
Inches per second squared
sensitivity
float64
The sensitivity of the sensor. This value is in the units you specify with the sensitivityUnits input. Refer to the sensor documentation to determine this value.
sensitivityUnits
int32
The units of sensitivity.
Name
Description
DAQmx_Val_PicoCoulombsPerG
pCoulomb/g
DAQmx_Val_PicoCoulombsPerMetersPerSecondSquared
pCoulomb/(m/s^2)
DAQmx_Val_PicoCoulombsPerInchesPerSecondSquared
pCoulomb/(in/s^2)
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.
Creates channel(s) that measure voltage ratios from a Wheatstone bridge.
Use this instance with bridge-based sensors that measure phenomena other than strain, force, pressure, or torque, or that scale data to physical units NI-DAQmx does not support.
Use a custom scale or other scaling code to convert the voltage ratios to physical units.
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.
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
Specifies in which unit to return voltage ratios from the channel.
Name
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
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.
Creates channel(s) that use a sensor with charge output.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 from the channel.
Value
Description
DAQmx_Val_FromCustomScale
Units a custom scale specifies. If you select this value, you must specify a custom scale name.
DAQmx_Val_Coulombs
Coulombs
DAQmx_Val_PicoCoulombs
Picocoulombs
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.
Creates channel(s) for current measurement and adds the channel(s) to the task you specify with taskHandle.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 measurement.
Value
Description
DAQmx_Val_Amps
amperes
DAQmx_Val_FromCustomScale
Units a custom scale specifies. If you select this value, you must specify a custom scale name.
shuntResistorLoc
int32
The location of the shunt resistor.
Value
Description
DAQmx_Val_Default
At run time, NI-DAQmx chooses the default shunt resistor location for the channel.
DAQmx_Val_Internal
Use the built-in shunt resistor of the device.
DAQmx_Val_External
Use a shunt resistor external to the device. You must specify the value of the shunt resistor in extShuntResistorVal.
extShuntResistorVal
float64
The value, in ohms, of an external shunt resistor.
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.
Creates channel(s) for RMS current measurement and adds the channel(s) to the task you specify with taskHandle.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 measurement.
Value
Description
DAQmx_Val_Amps
amperes
DAQmx_Val_FromCustomScale
Units a custom scale specifies. If you select this value, you must specify a custom scale name.
shuntResistorLoc
int32
The location of the shunt resistor.
Value
Description
DAQmx_Val_Default
At run time, NI-DAQmx chooses the default shunt resistor location for the channel.
DAQmx_Val_Internal
Use the built-in shunt resistor of the device.
DAQmx_Val_External
Use a shunt resistor external to the device. You must specify the value of the shunt resistor in extShuntResistorVal.
extShuntResistorVal
float64
The value, in ohms, of an external shunt resistor.
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.
Creates channel(s) that use a Wheatstone bridge to measure force or load.
Use this instance with sensors whose specifications provide a polynomial to convert electrical values to physical values.
When you use this scaling type, NI-DAQmx requires coefficients for a polynomial that converts electrical values to physical values (forward), as well as coefficients for a polynomial that converts physical values to electrical values (reverse). If you only know one set of coefficients, use the DAQmxCalculateReversePolyCoeff function to generate the other set.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return force measurements from the channel.
Name
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_KilogramForce
kilograms-force
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
forwardCoeffs
const float64 []
An array of coefficients for the polynomial that converts electrical values to physical values. Each element of the array corresponds to a term of the equation. For example, if index three of the array is 9, the fourth term of the equation is 9x^3.
numForwardCoeffs
uInt32
The number of coefficients in the forwardCoeffs array.
reverseCoeffs
const float64 []
An array of coefficients for the polynomial that converts physical values to electrical values. Each element of the array corresponds to a term of the equation. For example, if index three of the array is 9, the fourth term of the equation is 9x^3.
numReverseCoeffs
uInt32
The number of coefficients in the reverseCoeffs array.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
physicalUnits
int32
Specifies to which physical units to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_KilogramForce
kilograms-force
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.
Creates channel(s) that use a Wheatstone bridge to measure force or load.
Use this instance with sensors whose specifications provide a table of electrical values and the corresponding physical values.
When you use this scaling type, NI-DAQmx performs linear scaling between each pair of electrical and physical values. The input limits specified with minVal and maxVal must fall within the smallest and largest physical values. For any data outside those endpoints, NI-DAQmx coerces that data to the endpoints.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return force measurements from the channel.
Name
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_KilogramForce
kilograms-force
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
electricalVals
const float64 []
The array of electrical values that map to the values in physicalVals. Specify this value in the unit indicated by electricalUnits.
numElectricalVals
uInt32
The number of electrical values in the electricalVals array.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
physicalVals
const float64 []
The array of physical values that map to the values in electricalVals. Specify this value in the unit indicated by physicalUnits.
numPhysicalVals
uInt32
The number of physical values in the physicalVals array.
physicalUnits
int32
Specifies to which physical units to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_KilogramForce
kilograms-force
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.
Creates channel(s) that use a Wheatstone bridge to measure force or load.
Use this instance with sensors whose specifications do not provide a polynomial for scaling or a table of electrical and physical values.
When you use this scaling type, NI-DAQmx uses two points of electrical and physical values to calculate the slope and y-intercept of a linear equation and uses that equation to scale electrical values to physical values.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return force measurements from the channel.
Name
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_KilogramForce
kilograms-force
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
firstElectricalVal
float64
The first electrical value, corresponding to firstPhysicalVal. Specify this value in the unit indicated by electricalUnits.
secondElectricalVal
float64
The second electrical value, corresponding to secondPhysicalVal. Specify this value in the unit indicated by electricalUnits.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
firstPhysicalVal
float64
The first physical value, corresponding to firstElectricalVal. Specify this value in the unit indicated by physicalUnits.
secondPhysicalVal
float64
The second physical value, corresponding to secondElectricalValue. Specify this value in the unit indicated by physicalUnits.
physicalUnits
int32
Specifies to which physical units to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_KilogramForce
kilograms-force
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.
Creates channel(s) that use an IEPE force sensor to measure force or load.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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
Specifies in which unit to return force measurements from the channel.
Name
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
sensitivity
float64
The sensitivity of the sensor. This value is in the units you specify with the sensitivityUnits input. Refer to the sensor documentation to determine this value.
sensitivityUnits
int32
The units of sensitivity input.
Name
Description
DAQmx_Val_mVoltsPerNewton
millivolts per newton
DAQmx_Val_mVoltsPerPound
millivolts per pound
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) that use a frequency-to-voltage converter to measure frequency and adds the channel(s) to the task you specify with taskHandle.
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.
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 measurement.
Name
Description
DAQmx_Val_Hz
hertz
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
thresholdLevel
float64
The voltage level at which to recognize waveform repetitions.
hysteresis
float64
Specifies in volts a window below thresholdLevel. The input voltage must pass below thresholdLevel minus hysteresis before NI-DAQmx recognizes a waveform repetition. Hysteresis can improve measurement accuracy when the signal contains noise or jitter.
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.
Creates channel(s) that use a microphone to measure sound pressure and adds the channel(s) to the task you specify with taskHandle.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
units
int32
The units to use to return sound pressure measurements.
Name
Description
DAQmx_Val_Pascals
pascals
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
micSensitivity
float64
The sensitivity of the microphone. Specify this value in millivolts per pascal.
maxSndPressLevel
float64
The maximum instantaneous sound pressure level you expect to measure. This value is in decibels, referenced to 20 micropascals.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) that use a Wheatstone bridge to measure pressure.
Use this instance with sensors whose specifications provide a polynomial to convert electrical values to physical values.
When you use this scaling type, NI-DAQmx requires coefficients for a polynomial that converts electrical values to physical values (forward), as well as coefficients for a polynomial that converts physical values to electrical values (reverse). If you only know one set of coefficients, use the DAQmxCalculateReversePolyCoeff function to generate the other set.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return pressure measurements from the channel.
Name
Description
DAQmx_Val_PoundsPerSquareInch
pounds per square inch
DAQmx_Val_Bar
bar
DAQmx_Val_Pascals
pascals
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
forwardCoeffs
const float64 []
An array of coefficients for the polynomial that converts electrical values to physical values. Each element of the array corresponds to a term of the equation. For example, if index three of the array is 9, the fourth term of the equation is 9x^3.
numForwardCoeffs
uInt32
The number of coefficients in the forwardCoeffs array.
reverseCoeffs
const float64 []
An array of coefficients for the polynomial that converts physical values to electrical values. Each element of the array corresponds to a term of the equation. For example, if index three of the array is 9, the fourth term of the equation is 9x^3.
numReverseCoeffs
uInt32
The number of coefficients in the reverseCoeffs array.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
physicalUnits
int32
Specifies to which physical unit to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_PoundsPerSquareInch
pounds per square inch
DAQmx_Val_Bar
bar
DAQmx_Val_Pascals
pascals
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.
Creates channel(s) that use a Wheatstone bridge to measure pressure.
Use this instance with sensors whose specifications provide a table of electrical values and the corresponding physical values.
When you use this scaling type, NI-DAQmx performs linear scaling between each pair of electrical and physical values. The input limits specified with minVal and maxVal must fall within the smallest and largest physical values. For any data outside those endpoints, NI-DAQmx coerces that data to the endpoints.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return pressure measurements from the channel.
Name
Description
DAQmx_Val_PoundsPerSquareInch
pounds per square inch
DAQmx_Val_Bar
bar
DAQmx_Val_Pascals
pascals
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
electricalVals
const float64 []
The array of electrical values that map to the values in physicalVals. Specify this value in the unit indicated by electricalUnits.
numElectricalVals
uInt32
The number of electrical values in the electricalVals array.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
physicalVals
const float64 []
The array of physical values that map to the values in electricalVals. Specify this value in the unit indicated by physicalUnits.
numPhysicalVals
uInt32
The number of physical values in the physicalVals array.
physicalUnits
int32
Specifies to which physical unit to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_PoundsPerSquareInch
pounds per square inch
DAQmx_Val_Bar
bar
DAQmx_Val_Pascals
pascals
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.
Creates channel(s) that use a Wheatstone bridge to measure pressure.
Use this instance with sensors whose specifications do not provide a polynomial for scaling or a table of electrical and physical values.
When you use this scaling type, NI-DAQmx uses two points of electrical and physical values to calculate the slope and y-intercept of a linear equation and uses that equation to scale electrical values to physical values.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return pressure measurements from the channel.
Name
Description
DAQmx_Val_PoundsPerSquareInch
pounds per square inch
DAQmx_Val_Bar
bar
DAQmx_Val_Pascals
pascals
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
firstElectricalVal
float64
The first electrical value, corresponding to firstPhysicalVal. Specify this value in the unit indicated by electricalUnits.
secondElectricalVal
float64
The second electrical value, corresponding to secondPhysicalVal. Specify this value in the unit indicated by electricalUnits.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
firstPhysicalVal
float64
The first physical value, corresponding to firstElectricalVal. Specify this value in the unit indicated by physicalUnits.
secondPhysicalVal
float64
The second physical value, corresponding to secondElectricalValue. Specify this value in the unit indicated by physicalUnits.
physicalUnits
int32
Specifies to which physical unit to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_PoundsPerSquareInch
pounds per square inch
DAQmx_Val_Bar
bar
DAQmx_Val_Pascals
pascals
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.
Create channel(s) to measure resistance and adds the channel(s) to the task you specify with taskHandle.
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.
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 measurement.
Name
Description
DAQmx_Val_Ohms
ohms
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
resistanceConfig
int32
The configuration for resistance measurements.
Value
Description
DAQmx_Val_2Wire
2-wire mode.
DAQmx_Val_3Wire
3-wire mode.
DAQmx_Val_4Wire
4-wire mode.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) to measure strain and adds the channel(s) to the task you specify with taskHandle.
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.
minVal
float64
Specifies the minimum strain you expect to measure. This value applies to each strain gage in the rosette.
maxVal
float64
Specifies the maximum strain you expect to measure. This value applies to each strain gage in the rosette.
rosetteType
int32
Specifies the type of the rosette.
Value
Description
DAQmx_Val_RectangularRosette
A rectangular rosette consists of three strain gages, each separated by a 45 degree angle.
DAQmx_Val_DeltaRosette
A delta rosette consists of three strain gages, each separated by a 60 degree angle.
DAQmx_Val_TeeRosette
A tee rosette consists of two strain gages oriented at 90 degrees with respect to each other.
gageOrientation
float64
Specifies, in degrees, the orientation of the gage with respect to the preferred X axis. This parameter applies only to Cartesian measurements.
rosetteMeasTypes
const int32 []
Specifies the virtual channels to create for the rosette measurements. For each rosette sensor, the function creates one strain virtual channel for each strain gage in the rosette, and one rosette virtual channel for each measurement specified in the rosette measurements array.
Value
Description
DAQmx_Val_PrincipalStrain1
The maximum tensile strain coplanar to the surface of the material under stress.
DAQmx_Val_PrincipalStrain2
The minimum tensile strain coplanar to the surface of the material under stress.
DAQmx_Val_PrincipalStrainAngle
The angle, in degrees, at which the principal strains of the rosette occur with respect to the preferred X axis. The range is -180 degrees to 180 degrees, where negative values are angles below the X axis. For tee rosettes, this value is 0 degrees.
DAQmx_Val_CartesianStrainX
The tensile strain coplanar to the surface of the material under stress in the X coordinate direction.
DAQmx_Val_CartesianStrainY
The tensile strain coplanar to the surface of the material under stress in the Y coordinate direction.
DAQmx_Val_CartesianShearStrainXY
The strain coplanar to the cross section of the material under stress in the XY coordinate direction.
DAQmx_Val_MaxShearStrain
The maximum strain coplanar to the cross section of the material under stress.
DAQmx_Val_MaxShearStrainAngle
The angle, in degrees, at which the maximum shear strain of the rosette occurs with respect to the preferred X axis. The range is -125 degrees to 225 degrees, where negative values are angles below the X axis. Maximum shear strain angle occurs at an offset of 45 degrees relative to the principal strain angle. For tee rosettes, this value is 45 degrees.
numRosetteMeasTypes
uInt32
Specifies the number of virtual channels used in rosetteMeasTypes.
strainConfig
int32
The strain gage bridge configuration.
Note Typical rosette sensors use the DAQmx_Val_QuarterBridgeI strain configuration.
Value
Description
DAQmx_Val_FullBridgeI
Four active gages with two pairs subjected to equal and opposite strains.
DAQmx_Val_FullBridgeII
Four active gages with two aligned with maximum principal strain and two Poisson gages in adjacent arms.
DAQmx_Val_FullBridgeIII
Four active gages with two aligned with maximum principal strain and two Poisson gages in opposite arms.
DAQmx_Val_HalfBridgeI
Two active gages with one aligned with maximum principal strain and one Poisson gage.
DAQmx_Val_HalfBridgeII
Two active gages with equal and opposite strains.
DAQmx_Val_QuarterBridgeI
Single active gage.
DAQmx_Val_QuarterBridgeII
Single active gage and one dummy gage.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
gageFactor
float64
The sensitivity of the strain gages and relates the change in electrical resistance to the change in strain. Each gage in the bridge must have the same gage factor. Refer to the sensor documentation to determine this value.
nominalGageResistance
float64
The resistance, in ohms, of the gages in an unstrained position. Each gage in the bridge must have the same nominal gage resistance. The resistance across arms of the bridge that do not have strain gages must also be the same as the nominal gage resistance. Refer to the sensor documentation to determine this value.
poissonRatio
float64
The ratio of lateral strain to axial strain in the material in which you measure strain.
leadWireResistance
float64
The amount, in ohms, of resistance in the lead wires. Ideally, this value is the same for all leads.
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.
Creates channel(s) that use an RTD to measure temperature and adds the channel(s) to the task you specify with taskHandle.
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.
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 measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
rtdType
int32
The type of RTD connected to the channel.
Value
Description
DAQmx_Val_Pt3750
Pt3750
DAQmx_Val_Pt3851
Pt3851
DAQmx_Val_Pt3911
Pt3911
DAQmx_Val_Pt3916
Pt3916
DAQmx_Val_Pt3920
Pt3920
DAQmx_Val_Pt3928
Pt3928
DAQmx_Val_Custom
You must specify the 'A', 'B', and 'C' constants for the Callendar-Van Dusen equation
resistanceConfig
int32
The configuration for resistance measurements.
Value
Description
DAQmx_Val_2Wire
2-wire mode.
DAQmx_Val_3Wire
3-wire mode.
DAQmx_Val_4Wire
4-wire mode.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
r0
float64
The sensor resistance in ohms at 0 deg C for the Callendar-Van Dusen equation Refer to the sensor documentation to determine this value.
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.
Creates channel(s) to measure strain and adds the channel(s) to the task you specify with taskHandle.
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.
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 measurement.
Name
Description
DAQmx_Val_Strain
Strain
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
strainConfig
int32
The strain gage bridge configuration.
Value
Description
DAQmx_Val_FullBridgeI
Four active gages with two pairs subjected to equal and opposite strains.
DAQmx_Val_FullBridgeII
Four active gages with two aligned with maximum principal strain and two Poisson gages in adjacent arms.
DAQmx_Val_FullBridgeIII
Four active gages with two aligned with maximum principal strain and two Poisson gages in opposite arms.
DAQmx_Val_HalfBridgeI
Two active gages with one aligned with maximum principal strain and one Poisson gage.
DAQmx_Val_HalfBridgeII
Two active gages with equal and opposite strains.
DAQmx_Val_QuarterBridgeI
Single active gage.
DAQmx_Val_QuarterBridgeII
Single active gage and one dummy gage.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
gageFactor
float64
The sensitivity of the strain gages and relates the change in electrical resistance to the change in strain. Each gage in the bridge must have the same gage factor. Refer to the sensor documentation to determine this value.
initialBridgeVoltage
float64
The bridge output voltage in the unloaded condition. NI-DAQmx subtracts this value from any measurements before applying scaling equations. Perform a voltage measurement on the bridge with no strain applied to determine this value.
nominalGageResistance
float64
The resistance, in ohms, of the gages in an unstrained position. Each gage in the bridge must have the same nominal gage resistance. The resistance across arms of the bridge that do not have strain gages must also be the same as the nominal gage resistance. Refer to the sensor documentation to determine this value.
poissonRatio
float64
The ratio of lateral strain to axial strain in the material in which you measure strain.
leadWireResistance
float64
The amount, in ohms, of resistance in the lead wires. Ideally, this value is the same for all leads.
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.
Creates channel(s) to measure temperature with a built-in sensor of a terminal block or device and adds the channel(s) to the task you specify with taskHandle. On SCXI modules, for example, this could be the CJC sensor.
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.
units
int32
The units to use to return the measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
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.
Creates channel(s) that use a thermocouple to measure temperature and adds the channel(s) to the task you specify with taskHandle.
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.
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 measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
thermocoupleType
int32
The type of thermocouple connected to the channel.
Value
Description
DAQmx_Val_J_Type_TC
J-type thermocouple.
DAQmx_Val_K_Type_TC
K-type thermocouple.
DAQmx_Val_N_Type_TC
N-type thermocouple.
DAQmx_Val_R_Type_TC
R-type thermocouple.
DAQmx_Val_S_Type_TC
S-type thermocouple.
DAQmx_Val_T_Type_TC
T-type thermocouple.
DAQmx_Val_B_Type_TC
B-type thermocouple.
DAQmx_Val_E_Type_TC
E-type thermocouple.
cjcSource
int32
The source of cold junction compensation.
Value
Description
DAQmx_Val_BuiltIn
Use a cold-junction compensation channel built into the terminal block.
DAQmx_Val_ConstVal
You must specify the cold-junction temperature.
DAQmx_Val_Chan
Use a channel for cold-junction compensation.
cjcVal
float64
The temperature of the cold junction of the thermocouple if you set cjcSource to DAQmx_Val_ConstVal.
cjcChannel
const char []
The channel that acquires the temperature of the thermocouple cold-junction if you set cjcSource to DAQmx_Val_Chan. You can use a global channel or another virtual channel already in the task. If the channel is a temperature channel, NI-DAQmx acquires the temperature in the correct units. Other channel types, such as a resistance channel with a custom sensor, must use a custom scale to scale values to degrees Celsius.
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.
Creates channel(s) that use a thermistor to measure temperature and adds the channel(s) to the task you specify with taskHandle. Use this function when the thermistor requires current excitation.
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.
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 measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
resistanceConfig
int32
The configuration for resistance measurements.
Value
Description
DAQmx_Val_2Wire
2-wire mode.
DAQmx_Val_3Wire
3-wire mode.
DAQmx_Val_4Wire
4-wire mode.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
a
float64
The A constant from the Steinhart-Hart thermistor equation.
b
float64
The B constant from the Steinhart-Hart thermistor equation.
c
float64
The C constant from the Steinhart-Hart thermistor equation.
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.
Creates channel(s) that use a thermistor to measure temperature and adds the channel(s) to the task you specify with taskHandle. Use this function when the thermistor requires voltage excitation.
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.
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 measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
resistanceConfig
int32
The configuration for resistance measurements.
Value
Description
DAQmx_Val_2Wire
2-wire mode.
DAQmx_Val_3Wire
3-wire mode.
DAQmx_Val_4Wire
4-wire mode.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
a
float64
The A constant from the Steinhart-Hart thermistor equation.
b
float64
The B constant from the Steinhart-Hart thermistor equation.
c
float64
The C constant from the Steinhart-Hart thermistor equation.
r1
float64
The value, in ohms, of the reference resistor.
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.
Creates channel(s) that use a Wheatstone bridge to measure torque.
Use this instance with sensors whose specifications provide a polynomial to convert electrical values to physical values.
When you use this scaling type, NI-DAQmx requires coefficients for a polynomial that converts electrical values to physical values (forward), as well as coefficients for a polynomial that converts physical values to electrical values (reverse). If you only know one set of coefficients, use the DAQmxCalculateReversePolyCoeff function to generate the other set.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return torque measurements from the channel.
Name
Description
DAQmx_Val_NewtonMeters
newton meters
DAQmx_Val_InchOunces
ounce-inches
DAQmx_Val_InchPounds
pound-inches
DAQmx_Val_FootPounds
pound-feet
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
forwardCoeffs
const float64 []
An array of coefficients for the polynomial that converts electrical values to physical values. Each element of the array corresponds to a term of the equation. For example, if index three of the array is 9, the fourth term of the equation is 9x^3.
numForwardCoeffs
uInt32
The number of coefficients in the forwardCoeffs array.
reverseCoeffs
const float64 []
An array of coefficients for the polynomial that converts physical values to electrical values. Each element of the array corresponds to a term of the equation. For example, if index three of the array is 9, the fourth term of the equation is 9x^3.
numReverseCoeffs
uInt32
The number of coefficients in the reverseCoeffs array.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
physicalUnits
int32
Specifies to which physical units to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_NewtonMeters
newton meters
DAQmx_Val_InchOunces
ounce-inches
DAQmx_Val_InchPounds
pound-inches
DAQmx_Val_FootPounds
pound-feet
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.
Creates channel(s) that use a Wheatstone bridge to measure torque.
Use this instance with sensors whose specifications provide a table of electrical values and the corresponding physical values.
When you use this scaling type, NI-DAQmx performs linear scaling between each pair of electrical and physical values. The input limits specified with minVal and maxVal must fall within the smallest and largest physical values. For any data outside those endpoints, NI-DAQmx coerces that data to the endpoints.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return torque measurements from the channel.
Name
Description
DAQmx_Val_NewtonMeters
newton meters
DAQmx_Val_InchOunces
ounce-inches
DAQmx_Val_InchPounds
pound-inches
DAQmx_Val_FootPounds
pound-feet
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
electricalVals
const float64 []
The array of electrical values that map to the values in physicalVals. Specify this value in the unit indicated by electricalUnits.
numElectricalVals
uInt32
The number of electrical values in the electricalVals array.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
physicalVals
const float64 []
The array of physical values that map to the values in electricalVals. Specify this value in the unit indicated by physicalUnits.
numPhysicalVals
uInt32
The number of physical values in the physicalVals array.
physicalUnits
int32
Specifies to which physical units to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_NewtonMeters
newton meters
DAQmx_Val_InchOunces
ounce-inches
DAQmx_Val_InchPounds
pound-inches
DAQmx_Val_FootPounds
pound-feet
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.
Creates channel(s) that use a Wheatstone bridge to measure torque.
Use this instance with sensors whose specifications do not provide a polynomial for scaling or a table of electrical and physical values.
When you use this scaling type, NI-DAQmx uses two points of electrical and physical values to calculate the slope and y-intercept of a linear equation and uses that equation to scale electrical values to physical values.
Specify different values for units and physicalUnits if the sensor specifications provide physical values in one unit, but you want NI-DAQmx to scale data to a different unit.
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.
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
Specifies in which unit to return torque measurements from the channel.
Name
Description
DAQmx_Val_NewtonMeters
newton meters
DAQmx_Val_InchOunces
ounce-inches
DAQmx_Val_InchPounds
pound-inches
DAQmx_Val_FootPounds
pound-feet
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig
int32
Specifies the Wheatstone bridge configuration connected to the channel.
Value
Description
DAQmx_Val_FullBridge
Four active sensing elements in the bridge
DAQmx_Val_HalfBridge
Two active sensing elements in the bridge
DAQmx_Val_QuarterBridge
One active sensing element in the bridge
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
nominalBridgeResistance
float64
Specifies in ohms the resistance of the bridge while not under load.
firstElectricalVal
float64
The first electrical value, corresponding to firstPhysicalVal. Specify this value in the unit indicated by electricalUnits.
secondElectricalVal
float64
The second electrical value, corresponding to secondPhysicalVal. Specify this value in the unit indicated by electricalUnits.
electricalUnits
int32
Specifies from which electrical unit to scale data. Select the same unit that the sensor data sheet or calibration certificate uses for electrical values.
Value
Description
DAQmx_Val_VoltsPerVolt
volts per volt
DAQmx_Val_mVoltsPerVolt
millivolts per volt
firstPhysicalVal
float64
The first physical value, corresponding to firstElectricalVal. Specify this value in the unit indicated by physicalUnits.
secondPhysicalVal
float64
The second physical value, corresponding to secondElectricalValue. Specify this value in the unit indicated by physicalUnits.
physicalUnits
int32
Specifies to which physical units to scale electrical data. Select the same unit that the sensor data sheet or calibration certificate uses for physical values.
Value
Description
DAQmx_Val_NewtonMeters
newton meters
DAQmx_Val_InchOunces
ounce-inches
DAQmx_Val_InchPounds
pound-inches
DAQmx_Val_FootPounds
pound-feet
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.
Creates channel(s) that use an IEPE velocity sensor to measure velocity.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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
Specifies in which unit to return velocity measurements from the channel.
Value
Description
DAQmx_Val_MetersPerSecond
Meters per second.
DAQmx_Val_InchesPerSecond
Inches per second.
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
sensitivity
float64
The sensitivity of the sensor. This value is in the units you specify with the sensitivityUnits input. Refer to the sensor documentation to determine this value.
sensitivityUnits
int32
The units of sensitivity.
Name
Description
DAQmx_Val_MillivoltsPerMillimeterPerSecond
mVolts/mm/s.
DAQmx_Val_MilliVoltsPerInchPerSecond
mVolts/in/s.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) to measure voltage and adds the channel(s) to the task you specify with taskHandle. If your measurement requires the use of internal excitation or you need the voltage to be scaled by excitation, call DAQmxCreateAIVoltageChanWithExcit.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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.
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.
Creates channel(s) to measure RMS voltage and adds the channel(s) to the task you specify with taskHandle. If your measurement requires the use of internal excitation or you need the voltage to be scaled by excitation, call DAQmxCreateAIVoltageChanWithExcit.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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.
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.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
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.
Creates channel(s) that use an [eddy current proximity probe](javascript:LaunchHelp('daqhelp.chm', 'EddyCurrentProximityProbe.html')) to measure linear position and adds the channel(s) to the task you specify with taskHandle.
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.
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 linear position measurements from the channel.
Name
Description
DAQmx_Val_Meters
Meters
DAQmx_Val_Inches
Inches
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
sensitivity
float64
The sensitivity of the sensor. This value is in the units you specify with the sensitivityUnits input. Refer to the sensor documentation to determine this value.
sensitivityUnits
int32
The units of sensitivity.
Name
Description
DAQmx_Val_mVoltsPerMil
mVolts/mil
DAQmx_Val_VoltsPerMil
Volts/mil
DAQmx_Val_mVoltsPerMillimeter
mVolts/mMeter
DAQmx_Val_VoltsPerMillimeter
Volts/mMeter
DAQmx_Val_mVoltsPerMicron
mVolts/micron
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.
Creates channel(s) that use an LVDT to measure linear position and adds the channel(s) to the task you specify with taskHandle.
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.
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 linear position measurements from the channel.
Name
Description
DAQmx_Val_Meters
Meters
DAQmx_Val_Inches
Inches
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
sensitivity
float64
The sensitivity of the sensor. This value is in the units you specify with the sensitivityUnits input. Refer to the sensor documentation to determine this value.
sensitivityUnits
int32
The units of sensitivity.
Name
Description
DAQmx_Val_mVoltsPerVoltPerMillimeter
mvolts/volt/mmeter
DAQmx_Val_mVoltsPerVoltPerMilliInch
mvolts/volt/0.001 inch
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
voltageExcitFreq
float64
The excitation frequency, in hertz, that the sensor requires. Refer to the sensor documentation to determine this value.
ACExcitWireMode
int32
The number of leads on the sensor. Some sensors may require you to tie leads together to create a 4-wire, 5-wire, or 6-wire sensor. Refer to the documentation for your sensor for more information.
Value
Description
DAQmx_Val_4Wire
4-wire.
DAQmx_Val_5Wire
5-wire.
DAQmx_Val_6Wire
6-wire.
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.
Creates channel(s) that use an RVDT to measure angular position and adds the channel(s) to the task you specify with taskHandle.
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.
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 angular position measurements from the channel.
Name
Description
DAQmx_Val_Degrees
Degrees
DAQmx_Val_Radians
Radians
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
sensitivity
float64
The sensitivity of the sensor. This value is in the units you specify with the sensitivityUnits input. Refer to the sensor documentation to determine this value.
sensitivityUnits
int32
The units of sensitivity.
Name
Description
DAQmx_Val_mVoltsPerVoltPerDegree
mvolts/volt/degree
DAQmx_Val_mVoltsPerVoltPerRadian
mvolts/volt/radian
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
voltageExcitFreq
float64
The excitation frequency, in hertz, that the sensor requires. Refer to the sensor documentation to determine this value.
ACExcitWireMode
int32
The number of leads on the sensor. Some sensors may require you to tie leads together to create a 4-wire, 5-wire, or 6-wire sensor. Refer to the documentation for your sensor for more information.
Value
Description
DAQmx_Val_4Wire
4-wire.
DAQmx_Val_5Wire
5-wire.
DAQmx_Val_6Wire
6-wire.
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.
Creates channel(s) that use an accelerometer to measure acceleration and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 acceleration measurements from the channel.
Name
Description
DAQmx_Val_AccelUnit_g
G-force (g). 1 g is approximately equal to 9.81 m/s2.
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) to measure current and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 measurements.
Name
Description
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
DAQmx_Val_FromTEDS
Units defined by TEDS information associated with the channel.
shuntResistorLoc
int32
The location of the shunt resistor.
Value
Description
DAQmx_Val_Internal
Use the built-in shunt resistor of the device.
DAQmx_Val_External
Use a shunt resistor external to the device. You must specify the value of the shunt resistor in extShuntResistorVal.
extShuntResistorVal
float64
The value, in ohms, of an external shunt resistor.
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.
Creates a channel that measures voltage ratios from a Wheatstone bridge.
You must configure the physical channel(s) with TEDS information to use this function.
Use this instance with bridge-based sensors that measure phenomena other than strain, force, pressure, or torque, or that scale data to physical units NI-DAQmx does not support.
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.
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
Specifies in which unit to return measurements from the channel.
Name
Description
DAQmx_Val_FromTEDS
Units defined by TEDS information associated with the channel.
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
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.
Creates channel(s) that use a Wheatstone bridge to measure force or load.
You must configure the physical channel(s) with TEDS information to use this function. NI-DAQmx scales electrical values to physical values according to that TEDS information.
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.
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
Specifies in which unit to return force measurements from the channel.
Name
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_KilogramForce
kilograms-force
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
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.
Creates channel(s) that use an IEPE force sensor to measure force or load. You must configure the physical channel(s) with TEDS information to use this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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
Specifies in which unit to return force measurements from the channel.
Name
Description
DAQmx_Val_Newtons
newtons
DAQmx_Val_Pounds
pounds
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) that use a microphone to measure sound pressure and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
units
int32
The units to use to return sound pressure measurements.
Name
Description
DAQmx_Val_Pascals
pascals
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
maxSndPressLevel
float64
The maximum instantaneous sound pressure level you expect to measure. This value is in decibels, referenced to 20 micropascals.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) that use a Wheatstone bridge to measure pressure.
You must configure the physical channel(s) with TEDS information to use this function. NI-DAQmx scales electrical values to physical values according to that TEDS information.
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.
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
Specifies in which unit to return pressure measurements from the channel.
Name
Description
DAQmx_Val_PoundsPerSquareInch
pounds per square inch
DAQmx_Val_Bar
bar
DAQmx_Val_Pascals
pascals
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
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.
Creates channel(s) to measure resistance and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
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 measurements.
Name
Description
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
DAQmx_Val_FromTEDS
Units defined by TEDS information associated with the channel.
resistanceConfig
int32
The configuration for resistance measurements.
Value
Description
DAQmx_Val_2Wire
2-wire mode.
DAQmx_Val_3Wire
3-wire mode.
DAQmx_Val_4Wire
4-wire mode.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) that use an RTD to measure temperature and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
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 measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
resistanceConfig
int32
The configuration for resistance measurements.
Value
Description
DAQmx_Val_2Wire
2-wire mode.
DAQmx_Val_3Wire
3-wire mode.
DAQmx_Val_4Wire
4-wire mode.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) to measure strain and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
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 measurement.
Name
Description
DAQmx_Val_Strain
Strain
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
initialBridgeVoltage
float64
The bridge output voltage in the unloaded condition. NI-DAQmx subtracts this value from any measurements before applying scaling equations. Perform a voltage measurement on the bridge with no strain applied to determine this value.
leadWireResistance
float64
The amount, in ohms, of resistance in the lead wires. Ideally, this value is the same for all leads.
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.
Creates channel(s) that use a thermocouple to measure temperature and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
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 measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
cjcSource
int32
The source of cold junction compensation.
Value
Description
DAQmx_Val_BuiltIn
Use a cold-junction compensation channel built into the terminal block.
DAQmx_Val_ConstVal
You must specify the cold-junction temperature.
DAQmx_Val_Chan
Use a channel for cold-junction compensation.
cjcVal
float64
The temperature of the cold junction of the thermocouple if you set cjcSource to DAQmx_Val_ConstVal.
cjcChannel
const char []
The channel that acquires the temperature of the thermocouple cold-junction if you set cjcSource to DAQmx_Val_Chan. You can use a global channel or another virtual channel already in the task. If the channel is a temperature channel, NI-DAQmx acquires the temperature in the correct units. Other channel types, such as a resistance channel with a custom sensor, must use a custom scale to scale values to degrees Celsius.
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.
Creates channel(s) that use a thermistor to measure temperature and adds the channel(s) to the task you specify with taskHandle. Use this instance when the thermistor requires current excitation. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
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 measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
resistanceConfig
int32
The configuration for resistance measurements.
Value
Description
DAQmx_Val_2Wire
2-wire mode.
DAQmx_Val_3Wire
3-wire mode.
DAQmx_Val_4Wire
4-wire mode.
currentExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. You must use currentExcitVal 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 currentExcitVal 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.
currentExcitVal
float64
The amount of excitation, in amperes, that the sensor requires.
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.
Creates channel(s) that use a thermistor to measure temperature and adds the channel(s) to the task you specify with taskHandle. Use this instance when the thermistor requires voltage excitation. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
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 measurement.
Name
Description
DAQmx_Val_DegC
degrees Celsius
DAQmx_Val_DegF
degrees Fahrenheit
DAQmx_Val_Kelvins
kelvins
DAQmx_Val_DegR
degrees Rankine
resistanceConfig
int32
The configuration for resistance measurements.
Value
Description
DAQmx_Val_2Wire
2-wire mode.
DAQmx_Val_3Wire
3-wire mode.
DAQmx_Val_4Wire
4-wire mode.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
r1
float64
The value, in ohms, of the reference resistor.
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.
Creates channel(s) that use a Wheatstone bridge to measure torque.
You must configure the physical channel(s) with TEDS information to use this function. NI-DAQmx scales electrical values to physical values according to that TEDS information.
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.
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
Specifies in which unit to return torque measurements from the channel.
Name
Description
DAQmx_Val_NewtonMeters
newton meters
DAQmx_Val_InchOunces
ounce-inches
DAQmx_Val_InchPounds
pound-inches
DAQmx_Val_FootPounds
pound-feet
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
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.
Creates channel(s) to measure voltage and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function. If your measurement requires the use of internal excitation or you need the voltage to be scaled by the excitation, use the DAQmxCreateTEDSAIVoltageChanWithExcit function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 measurements.
Name
Description
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
DAQmx_Val_FromTEDS
Units defined by TEDS information associated with the channel.
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.
Creates channel(s) to measure voltage and adds the channel(s) to the task you specify with taskHandle. Use this instance for custom sensors that require excitation. You can use the excitation to scale the measurement. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
Value
Description
DAQmx_Val_Cfg_Default
At run time, NI-DAQmx chooses the default terminal configuration for the channel.
DAQmx_Val_RSE
Referenced single-ended mode
DAQmx_Val_NRSE
Non-referenced single-ended mode
DAQmx_Val_Diff
Differential mode
DAQmx_Val_PseudoDiff
Pseudodifferential mode
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 measurements.
Name
Description
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
DAQmx_Val_FromTEDS
Units defined by TEDS information associated with the channel.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
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.
Creates channel(s) that use an LVDT to measure linear position and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
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 linear position measurements from the channel.
Name
Description
DAQmx_Val_Meters
Meters
DAQmx_Val_Inches
Inches
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
voltageExcitFreq
float64
The excitation frequency, in hertz, that the sensor requires. Refer to the sensor documentation to determine this value.
ACExcitWireMode
int32
The number of leads on the sensor. Some sensors may require you to tie leads together to create a 4-wire, 5-wire, or 6-wire sensor. Refer to the documentation for your sensor for more information.
Value
Description
DAQmx_Val_4Wire
4-wire.
DAQmx_Val_5Wire
5-wire.
DAQmx_Val_6Wire
6-wire.
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.
Creates channel(s) that use an RVDT to measure angular position and adds the channel(s) to the task you specify with taskHandle. You must configure the physical channel(s) with TEDS information to use this function.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task used in this function.
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.
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 angular position measurements from the channel.
Name
Description
DAQmx_Val_Degrees
Degrees
DAQmx_Val_Radians
Radians
DAQmx_Val_FromCustomScale
Units specified by a custom scale. Use customScaleName to specify a custom scale.
voltageExcitSource
int32
The source of excitation.
Value
Description
DAQmx_Val_Internal
Use the built-in excitation source of the device. If you select this value, 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. If you select this value, you must use voltageExcitVal to specify the amount of excitation.
DAQmx_Val_None
Supply no excitation to the channel.
voltageExcitVal
float64
Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.
voltageExcitFreq
float64
The excitation frequency, in hertz, that the sensor requires. Refer to the sensor documentation to determine this value.
ACExcitWireMode
int32
The number of leads on the sensor. Some sensors may require you to tie leads together to create a 4-wire, 5-wire, or 6-wire sensor. Refer to the documentation for your sensor for more information.
Value
Description
DAQmx_Val_4Wire
4-wire.
DAQmx_Val_5Wire
5-wire.
DAQmx_Val_6Wire
6-wire.
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.
Creates channel(s) to generate current and adds the channel(s) to the task you specify with taskHandle.
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.
minVal
float64
The minimum value, in units, that you expect to generate.
maxVal
float64
The maximum value, in units, that you expect to generate.
units
int32
The units in which to generate current.
Value
Description
DAQmx_Val_Amps
amperes
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
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.
Creates a channel for continually generating a waveform on the selected physical channel.
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.
type
int32
Specifies the kind of waveform to generate.
Value
Description
DAQmx_Val_Sine
Sine wave
DAQmx_Val_Triangle
Triangle wave
DAQmx_Val_Square
Sawtooth wave
DAQmx_Val_Sawtooth
Square wave
frequency
float64
The frequency of the waveform to generate in hertz.
amplitude
float64
The zero-to-peak amplitude of the waveform to generate in volts. Zero and negative values are valid.
offset
float64
The voltage offset of the waveform to generate.
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.
Creates channel(s) to generate voltage and adds the channel(s) to the task you specify with taskHandle.
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.
minVal
float64
The minimum value, in units, that you expect to generate.
maxVal
float64
The maximum value, in units, that you expect to generate.
units
int32
The units in which to generate voltage.
Name
Description
DAQmx_Val_Volts
volts
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
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.
Creates channel(s) to measure digital signals and adds the channel(s) to the task you specify with taskHandle. You can group digital lines into one digital channel or separate them into multiple digital channels. If you specify one or more entire ports in lines by using port physical channel names, you cannot separate the ports into multiple channels. To separate ports into multiple channels, use this function multiple times with a different port each time.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
lines
const char []
The names of the digital lines used to create a virtual channel. You can specify a list or range of lines. Specifying a port and no lines is the equivalent of specifying all the lines of that port in order. Therefore, if you specify Dev1/port0 and port 0 has eight lines, this is expanded to Dev1/port0/line0:7.
nameToAssignToLines
const char []
The name of the created virtual channel(s). If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. 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 nameToAssignToLines, you must use the names when you refer to these channels in other NI-DAQmx functions.
lineGrouping
int32
Specifies whether to group digital lines into one or more virtual channels. If you specify one or more entire ports in lines, you must set lineGrouping to DAQmx_Val_ChanForAllLines.
Value
Description
DAQmx_Val_ChanPerLine
One channel for each line
DAQmx_Val_ChanForAllLines
One channel for all lines
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.
Creates channel(s) to generate digital signals and adds the channel(s) to the task you specify with taskHandle. You can group digital lines into one digital channel or separate them into multiple digital channels. If you specify one or more entire ports in lines by using port physical channel names, you cannot separate the ports into multiple channels. To separate ports into multiple channels, use this function multiple times with a different port each time.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
lines
const char []
The names of the digital lines used to create a virtual channel. You can specify a list or range of lines. Specifying a port and no lines is the equivalent of specifying all the lines of that port in order. Therefore, if you specify Dev1/port0 and port 0 has eight lines, this is expanded to Dev1/port0/line0:7.
nameToAssignToLines
const char []
The name of the created virtual channel(s). If you create multiple virtual channels with one call to this function, you can specify a list of names separated by commas. 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 nameToAssignToLines, you must use the names when you refer to these channels in other NI-DAQmx functions.
lineGrouping
int32
Specifies whether to group digital lines into one or more virtual channels. If you specify one or more entire ports in lines, you must set lineGrouping to DAQmx_Val_ChanForAllLines.
Value
Description
DAQmx_Val_ChanPerLine
One channel for each line
DAQmx_Val_ChanForAllLines
One channel for all lines
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.
Creates a channel to measure angular velocity. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
decodingType
int32
Specifies how to count and interpret the pulses that the encoder generates on signal A and signal B. DAQmx_Val_X1, DAQmx_Val_X2, and DAQmx_Val_X4 are valid for quadrature encoders only. DAQmx_Val_TwoPulseCounting is valid only for two-pulse encoders. DAQmx_Val_X2 and DAQmx_Val_X4 decoding are more sensitive to smaller changes in position than DAQmx_Val_X1 encoding, with DAQmx_Val_X4 being the most sensitive. However, more sensitive decoding is more likely to produce erroneous measurements if there is vibration in the encoder or other noise in the signals.
Value
Description
DAQmx_Val_X1
If signal A leads signal B, count the rising edges of signal A. If signal B leads signal A, count the falling edges of signal A.
DAQmx_Val_X2
Count the rising and falling edges of signal A.
DAQmx_Val_X4
Count the rising and falling edges of both signal A and signal B.
DAQmx_Val_TwoPulseCounting
Increment the count on rising edges of signal A. Decrement the count on rising pulses of signal B.
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
Specifies in which unit to return velocity measurements from the channel.
Value
Description
DAQmx_Val_RPM
Revolutions per minute.
DAQmx_Val_RadiansPerSecond
Radians per second.
DAQmx_Val_DegreesPerSecond
Degrees per second.
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
pulsesPerRev
uInt32
The number of pulses the encoder generates per revolution. This value is the number of pulses on either signal A or signal B, not the total number of pulses on both signal A and signal B.
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.
Creates a channel to count the number of rising or falling edges of a digital signal and adds the channel to the task you specify with taskHandle. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
edge
int32
Specifies on which edges of the input signal to increment or decrement the count.
Value
Description
DAQmx_Val_Rising
Rising edge(s).
DAQmx_Val_Falling
Falling edge(s).
initialCount
uInt32
The value from which to start counting.
countDirection
int32
Specifies whether to increment or decrement the counter on each edge.
Value
Description
DAQmx_Val_CountUp
Increment the count register on each edge.
DAQmx_Val_CountDown
Decrement the count register on each edge.
DAQmx_Val_ExtControlled
The state of a digital line controls the count direction. Each counter has a default count direction terminal.
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.
Creates channel(s) to duty cycle of a digital pulse. Connect the input signal to the default input terminal of the counter unless you select a different input terminal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
maxFreq
float64
The maximum frequency you expect to measure.
minFreq
float64
The minimum frequency you expect to measure.
edge
int32
Specifies between which edges to measure the frequency or period of the signal.
Value
Description
DAQmx_Val_Falling
Measure between falling edges.
DAQmx_Val_Rising
Measure between rising edges.
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.
Creates a channel to measure the frequency of a digital signal and adds the channel to the task you specify with taskHandle. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
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 measurement.
Name
Description
DAQmx_Val_Hz
hertz
DAQmx_Val_Ticks
Timebase ticks
DAQmx_Val_FromCustomScale
Units by a custom scale. Use customScaleName to specify a custom scale.
edge
int32
Specifies between which edges to measure the frequency or period of the signal.
Value
Description
DAQmx_Val_Rising
Rising edge(s).
DAQmx_Val_Falling
Falling edge(s).
measMethod
int32
The method used to calculate the period or frequency of the signal.
Value
Description
DAQmx_Val_LowFreq1Ctr
Use one counter that uses a constant timebase to measure the input signal.
DAQmx_Val_HighFreq2Ctr
Use two counters, one of which counts pulses of the signal to measure during the specified measurement time.
DAQmx_Val_LargeRng2Ctr
Use one counter to divide the frequency of the input signal to create a lower-frequency signal that the second counter can more easily measure.
Caution Refer to [Quantization Error](javascript:LaunchHelp('daqhelp.chm', 'QuantError.html')) in the NI-DAQmx Help to choose a measurement method that will limit error in the frequency measurement.
measTime
float64
The length of time to measure the frequency or period of a digital signal, when measMethod is DAQmx_Val_HighFreq2Ctr. Measurement accuracy increases with increased measurement time and with increased signal frequency.
Caution If you measure a high-frequency signal for too long a time, the count register could roll over, resulting in an incorrect measurement.
divisor
uInt32
The value by which to divide the input signal, when measMethod is DAQmx_Val_LargeRng2Ctr. The larger this value, the more accurate the measurement, but too large a value can cause the count register to roll over, resulting in an incorrect 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.
Creates a channel that uses a linear encoder to measure linear velocity. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
decodingType
int32
Specifies how to count and interpret the pulses that the encoder generates on signal A and signal B. DAQmx_Val_X1, DAQmx_Val_X2, and DAQmx_Val_X4 are valid for quadrature encoders only. DAQmx_Val_TwoPulseCounting is valid only for two-pulse encoders. DAQmx_Val_X2 and DAQmx_Val_X4 decoding are more sensitive to smaller changes in position than DAQmx_Val_X1 encoding, with DAQmx_Val_X4 being the most sensitive. However, more sensitive decoding is more likely to produce erroneous measurements if there is vibration in the encoder or other noise in the signals.
Value
Description
DAQmx_Val_X1
If signal A leads signal B, count the rising edges of signal A. If signal B leads signal A, count the falling edges of signal A.
DAQmx_Val_X2
Count the rising and falling edges of signal A.
DAQmx_Val_X4
Count the rising and falling edges of both signal A and signal B.
DAQmx_Val_TwoPulseCounting
Increment the count on rising edges of signal A. Decrement the count on rising pulses of signal B.
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
Specifies in which unit to return velocity measurements from the channel.
Value
Description
DAQmx_Val_MetersPerSecond
Meters per second.
DAQmx_Val_InchesPerSecond
Inches per second.
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
distPerPulse
float64
The distance to measure for each pulse the encoder generates on signal A or signal B. This value is in the units specified with the units input.
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.
Creates a channel to measure the period of a digital signal and adds the channel to the task you specify with taskHandle. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Note When measMethod is set to DAQmx_Val_LowFreq1Ctr, you must pass the values 0.000001 for measTime and 4 for divisor. These values will be ignored by the function, but if they are not passed, the function returns an error.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
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 measurement.
Value
Description
DAQmx_Val_Seconds
seconds
DAQmx_Val_Ticks
Timebase ticks
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
edge
int32
Specifies between which edges to measure the frequency or period of the signal.
Value
Description
DAQmx_Val_Rising
Rising edge(s).
DAQmx_Val_Falling
Falling edge(s).
measMethod
int32
Specifies the method used to calculate the frequency or period of the signal.
Value
Description
DAQmx_Val_LowFreq1Ctr
Use one counter that uses a constant timebase to measure the input signal.
DAQmx_Val_HighFreq2Ctr
Use two counters, one of which counts pulses of the signal to measure during the specified measurement time.
DAQmx_Val_LargeRng2Ctr
Use one counter to divide the frequency of the input signal to create a lower-frequency signal that the second counter can more easily measure.
measTime
float64
The length of time to measure the frequency or period of a digital signal, when measMethod is DAQmx_Val_HighFreq2Ctr. Measurement accuracy increases with increased measurement time and with increased signal frequency.
Caution If you measure a high-frequency signal for too long a time, the count register could roll over, resulting in an incorrect measurement.
divisor
uInt32
The value by which to divide the input signal, when measMethod is DAQmx_Val_LargeRng2Ctr. The larger this value, the more accurate the measurement, but too large a value can cause the count register to roll over, resulting in an incorrect 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.
Creates a channel to measure pulse specifications, returning the measurements as pairs of frequency and duty cycle, and adds the channel to the task you specify with taskHandle. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
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 measurement.
Value
Description
DAQmx_Val_Hz
hertz
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.
Creates a channel to measure pulse specifications, returning the measurements as pairs of high ticks and low ticks, and adds the channel to the task you specify with taskHandle. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
sourceTerminal
const char []
The originating terminal of the route. You can specify a terminal name.
minVal
float64
The minimum value that you expect to measure.
maxVal
float64
The maximum value that you expect to measure.
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.
Creates a channel to measure pulse specifications, returning the measurements as pairs of high time and low time, and adds the channel to the task you specify with taskHandle. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
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 measurement.
Value
Description
DAQmx_Val_Seconds
seconds
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.
Creates a channel to measure the width of a digital pulse and adds the channel to the task you specify with taskHandle. startingEdge determines whether to measure a high pulse or a low pulse. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
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 measurement.
Value
Description
DAQmx_Val_Seconds
seconds
DAQmx_Val_Ticks
Timebase ticks
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
startingEdge
int32
Specifies on which edge to begin measuring pulse width.
Value
Description
DAQmx_Val_Rising
Rising edge(s).
DAQmx_Val_Falling
Falling edge(s).
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.
Creates a channel to measure the time between state transitions of a digital signal and adds the channel to the task you specify with taskHandle. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
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 measurement.
Value
Description
DAQmx_Val_Seconds
seconds
DAQmx_Val_Ticks
Timebase ticks
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
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.
Creates a channel that measures the amount of time between the rising or falling edge of one digital signal and the rising or falling edge of another digital signal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual channels.
nameToAssignToChannel
const char []
The name to assign to the created virtual channel. 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.
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 measurement.
Value
Description
DAQmx_Val_Seconds
seconds
DAQmx_Val_Ticks
Timebase ticks
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
firstEdge
int32
Specifies on which edge of the first signal to start each measurement.
Name
Description
DAQmx_Val_Rising
Start each measurement on the rising edge of the first signal.
DAQmx_Val_Falling
Start each measurement on the falling edge of the first signal.
secondEdge
int32
Specifies on which edge of the first signal to stop each measurement.
Name
Description
DAQmx_Val_Rising
Stop each measurement on the rising edge of the second signal.
DAQmx_Val_Falling
Stop each measurement on the falling edge of the second signal.
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.
Creates a channel that uses a linear encoder to measure linear position. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual channels.
nameToAssignToChannel
const char []
The name to assign to the created virtual channel. 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.
decodingType
int32
Specifies how to count and interpret the pulses that the encoder generates on signal A and signal B. DAQmx_Val_X1, DAQmx_Val_X2, and DAQmx_Val_X4 are valid for quadrature encoders only. DAQmx_Val_TwoPulseCounting is valid only for two-pulse encoders. DAQmx_Val_X2 and DAQmx_Val_X4 decoding are more sensitive to smaller changes in position than DAQmx_Val_X1 encoding, with DAQmx_Val_X4 being the most sensitive. However, more sensitive decoding is more likely to produce erroneous measurements if there is vibration in the encoder or other noise in the signals.
Value
Description
DAQmx_Val_X1
If signal A leads signal B, count the rising edges of signal A. If signal B leads signal A, count the falling edges of signal A.
DAQmx_Val_X2
Count the rising and falling edges of signal A.
DAQmx_Val_X4
Count the rising and falling edges of both signal A and signal B.
DAQmx_Val_TwoPulseCounting
Increment the count on rising edges of signal A. Decrement the count on rising pulses of signal B.
ZidxEnable
bool32
Specifies whether to enable z indexing for the measurement.
ZidxVal
float64
The value, in units, to which to reset the measurement when signal Z is high and signal A and signal B are at the states you specify with ZidxPhase.
ZidxPhase
int32
The states at which signal A and signal B must be while signal Z is high for NI-DAQmx to reset the measurement. If signal Z is never high while the signal A and signal B are high, for example, you must choose a phase other than DAQmx_Val_AHighBHigh. When signal Z goes high and how long it stays high varies from encoder to encoder. Refer to the documentation for the encoder to determine the timing of signal Z with respect to signal A and signal B.
Value
Description
DAQmx_Val_AHighBHigh
Reset the measurement when both signal A and signal B are at high logic.
DAQmx_Val_AHighBLow
Reset the measurement when signal A is at high logic and signal B is at low logic.
DAQmx_Val_ALowBHigh
Reset the measurement when signal A is at low logic and signal B is at high logic.
DAQmx_Val_ALowBLow
Reset the measurement when both signal A and signal B are at low logic.
units
int32
The units to use to return linear position measurements from the channel.
Name
Description
DAQmx_Val_Meters
Meters.
DAQmx_Val_Inches
Inches.
DAQmx_Val_Ticks
Timebase Ticks.
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
distPerPulse
float64
The distance measured for each pulse the encoder generates. Specify this value in units.
initialPos
float64
The position of the encoder when the measurement begins. This value is in units.
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.
Creates a channel that uses an angular encoder to measure angular position. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual channels.
nameToAssignToChannel
const char []
The name to assign to the created virtual channel. 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.
decodingType
int32
Specifies how to count and interpret the pulses that the encoder generates on signal A and signal B. DAQmx_Val_X1, DAQmx_Val_X2, and DAQmx_Val_X4 are valid for quadrature encoders only. DAQmx_Val_TwoPulseCounting is valid only for two-pulse encoders. DAQmx_Val_X2 and DAQmx_Val_X4 decoding are more sensitive to smaller changes in position than DAQmx_Val_X1 encoding, with DAQmx_Val_X4 being the most sensitive. However, more sensitive decoding is more likely to produce erroneous measurements if there is vibration in the encoder or other noise in the signals.
Value
Description
DAQmx_Val_X1
If signal A leads signal B, count the rising edges of signal A. If signal B leads signal A, count the falling edges of signal A.
DAQmx_Val_X2
Count the rising and falling edges of signal A.
DAQmx_Val_X4
Count the rising and falling edges of both signal A and signal B.
DAQmx_Val_TwoPulseCounting
Increment the count on rising edges of signal A. Decrement the count on rising pulses of signal B.
ZidxEnable
bool32
Specifies whether to enable z indexing for the measurement.
ZidxVal
float64
The value, in units, to which to reset the measurement when signal Z is high and signal A and signal B are at the states you specify with ZidxPhase.
ZidxPhase
int32
The states at which signal A and signal B must be while signal Z is high for NI-DAQmx to reset the measurement. If signal Z is never high while the signal A and signal B are high, for example, you must choose a phase other than DAQmx_Val_AHighBHigh. When signal Z goes high and how long it stays high varies from encoder to encoder. Refer to the documentation for the encoder to determine the timing of signal Z with respect to signal A and signal B.
Value
Description
DAQmx_Val_AHighBHigh
Reset the measurement when both signal A and signal B are at high logic.
DAQmx_Val_AHighBLow
Reset the measurement when signal A is at high logic and signal B is at low logic.
DAQmx_Val_ALowBHigh
Reset the measurement when signal A is at low logic and signal B is at high logic.
DAQmx_Val_ALowBLow
Reset the measurement when both signal A and signal B are at low logic.
units
int32
The units to use to return angular position measurements from the channel.
Value
Description
DAQmx_Val_Degrees
Degrees
DAQmx_Val_Radians
Radians
DAQmx_Val_Ticks
Timebase ticks
DAQmx_Val_FromCustomScale
Units a custom scale specifies. Use customScaleName to specify a custom scale.
pulsesPerRev
uInt32
The number of pulses the encoder generates per revolution. This value is the number of pulses on one of either A signal or B signal, not the total number of pulses on both signal A and signal B.
initialAngle
float64
The starting angle of the encoder when the measurement begins. Specify this value in units.
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.
Creates a channel that uses a special-purpose counter to take a timestamp and synchronizes that counter to a GPS receiver. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter to use to create virtual 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.
units
int32
The units to use to return the timestamp.
Value
Description
DAQmx_Val_Seconds
Seconds
DAQmx_Val_FromCustomScale
From custom scale
gpsSyncMethod
int32
The method to use to synchronize the counter to a GPS receiver.
Value
Description
DAQmx_Val_IRIGB
IRIG-B
DAQmx_Val_PPS
PPS
DAQmx_Val_None
None
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.
Creates channel(s) to generate digital pulses that freq and dutyCycle define and adds the channel to the task you specify with taskHandle. The pulses appear on the default output terminal of the counter unless you select a different output terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter 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.
units
int32
The units in which to specify freq.
Name
Description
DAQmx_Val_Hz
hertz
idleState
int32
The resting state of the output terminal.
Value
Description
DAQmx_Val_High
High state.
DAQmx_Val_Low
Low state.
initialDelay
float64
The amount of time in seconds to wait before generating the first pulse.
freq
float64
The frequency at which to generate pulses.
dutyCycle
float64
The width of the pulse divided by the pulse period. NI-DAQmx uses this ratio, combined with frequency, to determine pulse width and the interval between pulses.
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.
Creates channel(s) to generate digital pulses defined by the number of timebase ticks that the pulse is at a high state and the number of timebase ticks that the pulse is at a low state and also adds the channel to the task you specify with taskHandle. The pulses appear on the default output terminal of the counter unless you select a different output terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter 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.
sourceTerminal
const char []
The terminal to which you connect an external timebase. You also can specify a source terminal by using a terminal name.
idleState
int32
The resting state of the output terminal.
Value
Description
DAQmx_Val_High
High state.
DAQmx_Val_Low
Low state.
initialDelay
int32
The number of timebase ticks to wait before generating the first pulse.
lowTicks
int32
The number of timebase ticks that the pulse is low.
highTicks
int32
The number of timebase ticks that the pulse is high.
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.
Creates channel(s) to generate digital pulses defined by the amount of time the pulse is at a high state and the amount of time the pulse is at a low state and adds the channel to the task you specify with taskHandle. The pulses appear on the default output terminal of the counter unless you select a different output terminal.
Parameters
Input
Name
Type
Description
taskHandle
TaskHandle
The task to which to add the channels that this function creates.
counter
const char []
The name of the counter 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.
units
int32
The units in which to define pulse high and low time.
Value
Description
DAQmx_Val_Seconds
Seconds
idleState
int32
The resting state of the output terminal.
Value
Description
DAQmx_Val_High
High state.
DAQmx_Val_Low
Low state.
initialDelay
float64
The amount of time in seconds to wait before generating the first pulse.
lowTime
float64
The amount of time the pulse is low, in seconds.
highTime
float64
The amount of time the pulse is high, in seconds.
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.