NI-DAQmx .NET Framework 4.0 API Reference

Table of Contents

AIChannelCollection.CreateVoltageChannelWithExcitation Method (String, String, AITerminalConfiguration, Double, Double, AIBridgeConfiguration, AIExcitationSource, Double, Boolean, AIVoltageUnits)

  • Updated2023-02-21
  • 3 minute(s) read
AIChannelCollection.CreateVoltageChannelWithExcitation Method (String, String, AITerminalConfiguration, Double, Double, AIBridgeConfiguration, AIExcitationSource, Double, Boolean, AIVoltageUnits)
Creates an AIChannel to measure voltage for custom sensors that require excitation. 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 CreateVoltageChannelWithExcitation(
	string physicalChannelName,
	string nameToAssignChannel,
	AITerminalConfiguration configuration,
	double minimumValue,
	double maximumValue,
	AIBridgeConfiguration bridgeConfiguration,
	AIExcitationSource voltageExcitationSource,
	double voltageExcitationValue,
	bool useExcitationForScaling,
	AIVoltageUnits units
)
Public Function CreateVoltageChannelWithExcitation ( 
	physicalChannelName As String,
	nameToAssignChannel As String,
	configuration As AITerminalConfiguration,
	minimumValue As Double,
	maximumValue As Double,
	bridgeConfiguration As AIBridgeConfiguration,
	voltageExcitationSource As AIExcitationSource,
	voltageExcitationValue As Double,
	useExcitationForScaling As Boolean,
	units As AIVoltageUnits
) 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.
configuration
Type: NationalInstruments.DAQmxAITerminalConfiguration
The input terminal configuration. To use the default terminal configuration for the physical channel(s) being used, pass a value of -1 casted to an AITerminalConfiguration.
minimumValue
Type: SystemDouble
The minimum value expected from the measurement, in units.
maximumValue
Type: SystemDouble
The maximum value expected from the measurement, in units.
bridgeConfiguration
Type: NationalInstruments.DAQmxAIBridgeConfiguration
The bridge configuration. If you set bridgeConfiguration to NoBridge, useExcitationForScaling has no effect.
voltageExcitationSource
Type: NationalInstruments.DAQmxAIExcitationSource
The source of excitation.
voltageExcitationValue
Type: SystemDouble
The amount of excitation in volts that the sensor requires.
useExcitationForScaling
Type: SystemBoolean
if NI-DAQmx divides the measurement by the excitation. Typically, you set useExcitationForScaling to for ratiometric tranducers. If you set useExcitationForScaling to , set maximumValue and minimumValue 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 minimumValue to 50 and set maximumValue to 50.
units
Type: NationalInstruments.DAQmxAIVoltageUnits
The units to use to return the measurement.

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. CreateVoltageChannelWithExcitation(String, String, AITerminalConfiguration, Double, Double, AIBridgeConfiguration, AIExcitationSource, Double, Boolean, AIVoltageUnits) 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