NI-DAQmx .NET Framework 4.0 API Reference

Content Type
Programming Language
Current manual
Table of Contents
Product DocumentationNI-DAQmx .NET Framework 4.0 API ReferenceAIChannelCollection.CreateThermocoupleChannel Method (String, String, Double, Double, AIThermocoupleType, AITemperatureUnits, String)Current page
Table of Contents

AIChannelCollection.CreateThermocoupleChannel Method (String, String, Double, Double, AIThermocoupleType, AITemperatureUnits, String)

AIChannelCollection.CreateThermocoupleChannel Method (String, String, Double, Double, AIThermocoupleType, AITemperatureUnits, String)

AIChannelCollectionCreateThermocoupleChannel Method (String, String, Double, Double, AIThermocoupleType, AITemperatureUnits, String)

Creates an AIChannel that uses a thermocouple to measure temperature using a measurement on another channel for cold-junction compensation. 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 CreateThermocoupleChannel(
	string physicalChannelName,
	string nameToAssignChannel,
	double minimumValue,
	double maximumValue,
	AIThermocoupleType thermocoupleType,
	AITemperatureUnits units,
	string cjcChannel
)
Public Function CreateThermocoupleChannel ( 
	physicalChannelName As String,
	nameToAssignChannel As String,
	minimumValue As Double,
	maximumValue As Double,
	thermocoupleType As AIThermocoupleType,
	units As AITemperatureUnits,
	cjcChannel 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.
thermocoupleType
Type: NationalInstruments.DAQmxAIThermocoupleType
The type of thermocouple connected to the channel. Thermocouple types differ in composition and measurement range.
units
Type: NationalInstruments.DAQmxAITemperatureUnits
The units to use to return the measurement.
cjcChannel
Type: SystemString
The channel that acquires the temperature of the thermocouple cold-junction if you set AIThermocoupleCjcSource to Channel. 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

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. CreateThermocoupleChannel(String, String, Double, Double, AIThermocoupleType, AITemperatureUnits, 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

Was this information helpful?