NI-DAQ™mx C Reference

DAQmxCreateAIForceBridgeTableChan

int32 DAQmxCreateAIForceBridgeTableChan(TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], float64 minVal, float64 maxVal, int32 units, int32 bridgeConfig, int32 voltageExcitSource, float64 voltageExcitVal, float64 nominalBridgeResistance, const float64 electricalVals[], uInt32 numElectricalVals, int32 electricalUnits, const float64 physicalVals[], uInt32 numPhysicalVals, int32 physicalUnits, const char customScaleName[]);

Purpose

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.
NameDescription
DAQmx_Val_Newtonsnewtons
DAQmx_Val_Poundspounds
DAQmx_Val_KilogramForcekilograms-force
DAQmx_Val_FromCustomScaleUnits a custom scale specifies. Use customScaleName to specify a custom scale.
bridgeConfig int32 Specifies the Wheatstone bridge configuration connected to the channel.
ValueDescription
DAQmx_Val_FullBridgeFour active sensing elements in the bridge
DAQmx_Val_HalfBridgeTwo active sensing elements in the bridge
DAQmx_Val_QuarterBridgeOne 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.
ValueDescription
DAQmx_Val_VoltsPerVoltvolts per volt
DAQmx_Val_mVoltsPerVoltmillivolts 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.
ValueDescription
DAQmx_Val_Newtonsnewtons
DAQmx_Val_Poundspounds
DAQmx_Val_KilogramForcekilograms-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.