NI-DAQmx .NET Framework 4.0 API Reference

Table of Contents

AIChannelCollection.CreateStrainGageChannel Method (String, String, Double, Double, AIStrainGageConfiguration, AIExcitationSource, Double, Double, Double, Double, Double, Double, String)

  • Updated2023-02-21
  • 3 minute(s) read
AIChannelCollection.CreateStrainGageChannel Method (String, String, Double, Double, AIStrainGageConfiguration, AIExcitationSource, Double, Double, Double, Double, Double, Double, String)
Creates an AIChannel with the specified custom scale to measure strain. This method adds one or more physical channels to the AIChannelCollection.

Namespace:  NationalInstruments.DAQmx
Assembly:  NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302

Syntax

public AIChannel CreateStrainGageChannel(
	string physicalChannelName,
	string nameToAssignChannel,
	double minimumValue,
	double maximumValue,
	AIStrainGageConfiguration strainGageConfiguration,
	AIExcitationSource voltageExcitationSource,
	double voltageExcitationValue,
	double gageFactor,
	double initialBridgeVoltage,
	double nominalGageResistance,
	double poissonRatio,
	double leadWireResistance,
	string customScaleName
)
Public Function CreateStrainGageChannel ( 
	physicalChannelName As String,
	nameToAssignChannel As String,
	minimumValue As Double,
	maximumValue As Double,
	strainGageConfiguration As AIStrainGageConfiguration,
	voltageExcitationSource As AIExcitationSource,
	voltageExcitationValue As Double,
	gageFactor As Double,
	initialBridgeVoltage As Double,
	nominalGageResistance As Double,
	poissonRatio As Double,
	leadWireResistance As Double,
	customScaleName As String
) As AIChannel

Parameters

physicalChannelName
Type: SystemString
The names of one or more physical channels to use to create one or more local virtual channels.
nameToAssignChannel
Type: SystemString
One or more names to assign to the created local virtual channels. To use the physical channel name as the local virtual channel name, set this value to Empty.
minimumValue
Type: SystemDouble
The minimum value expected from the measurement, in units.
maximumValue
Type: SystemDouble
The maximum value expected from the measurement, in units.
strainGageConfiguration
Type: NationalInstruments.DAQmxAIStrainGageConfiguration
The bridge configuration of the strain gage.
voltageExcitationSource
Type: NationalInstruments.DAQmxAIExcitationSource
The source of excitation.
voltageExcitationValue
Type: SystemDouble
The amount of excitation in volts that the sensor requires.
gageFactor
Type: SystemDouble
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
Type: SystemDouble
The output voltage of the bridge 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
Type: SystemDouble
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
Type: SystemDouble
The ratio of lateral strain to axial strain in the material you are measuring.
leadWireResistance
Type: SystemDouble
The amount in ohms of resistance in the lead wires. Ideally, this value is the same for all leads.
customScaleName
Type: SystemString
The name of the custom scale to apply to the local virtual channel.

Return Value

Type: AIChannel
The newly created AIChannel.

Exceptions

ExceptionCondition
DaqExceptionThe NI-DAQmx driver returned an error.

Remarks

This method creates a local virtual channel for every physical channel name you specify. If you create multiple local virtual channels with one call to this method, you can specify a comma-delimited list of names for nameToAssignChannel. If you provide fewer local virtual channel names in nameToAssignChannel than you create, NI-DAQmx automatically assigns names to the local virtual channels.

If you do not provide a value for nameToAssignChannel, NI-DAQmx uses the physicalChannelName as the local virtual channel name. If you use nameToAssignChannel to create a name for the local virtual channel, you must use this name in other properties and methods.

The NI-DAQmx driver does not determine if the requested settings are possible until the task is verified. CreateStrainGageChannel(String, String, Double, Double, AIStrainGageConfiguration, AIExcitationSource, Double, Double, Double, Double, Double, Double, String) does not throw an exception for parameter values that are not compatible with your hardware or other settings in your task. To determine if all of the settings for a Task are valid, you must verify the task by starting the task, either with Start or by reading from or writing to the task, or by calling Control(TaskAction) with Verify.

See Also

Log in to get a better experience