Main Content

Channel Properties

Get Property Information

You can use the get, set, and properties functions to get information on channel object properties. For example, create a DataAcquisition and add a voltage measurement input channel, then view the channel properties:

d = daq("ni");
ch = addinput(d,"Dev1",1,"Voltage");
get(ch)
       Coupling: DC
 TerminalConfig: Differential
          Range: -10 to +10 Volts
           Name: 'Dev1_ai1'
             ID: 'ai1'
         Device: [1x1 daq.ni.DeviceInfo]
MeasurementType: 'Voltage'

View the channel settable properties and their acceptable values:

set(ch)
      Coupling: [ DC | AC ]
TerminalConfig: [ Differential | SingleEnded | SingleEndedNonReferenced | PseudoDifferential ]
         Range: -10 to +10 Volts
          Name: {}

Change the channel terminal configuration:

ch.TerminalConfig = "SingleEnded"
ch = 

    Index    Type    Device    Channel      Measurement Type             Range              Name   
    _____    ____    ______    _______    _____________________    __________________    __________

      1      "ai"    "Dev1"     "ai1"     "Voltage (SingleEnd)"    "-10 to +10 Volts"    "Dev1_ai1"

You can also request help in the Command Window on a specific property, providing either the object and property, or the class name and property. For example:

help ch.TerminalConfig

or

help ("daq.AnalogInputVoltageChannel.TerminalConfig")
 TerminalConfig The current input type (single ended/differential)

All Channels

All channel objects have these properties in common for all measurement types:

PropertyDescriptionValues
NameChannel namecharacter vector constructed of device ID and channel ID
IDChannel identifier corresponding to device terminal ID

character vector, for example:

'ai0'
'ao3'
'Port2/Line1'
'ctr0'
DeviceDeviceInfo object for device with this channelDeviceInfo object handle
MeasurementTypeType of measurement

character vector, for example:

'Voltage'
'Current'
'Thermocouple'
'Digital'
'Audio'

Analog Input and Output Channels

Voltage Measurement

Input voltage measurement channel objects also include these properties:

PropertyDescriptionValues
RangeInput value rangedouble values depending on measurement type and device support
CouplingCoupling mode of the channel

character vector of:

'AC'
'DC'
TerminalConfigChannel terminal configuration as described in Channel Configuration

character vector of:

'Differential'
'SingleEnded'
'SingleEndedNonReferenced'
'PseudoDifferential'

Current Measurement

Current measurement channel objects also include these properties:

PropertyDescriptionValues
Current Input
RangeInput value rangedouble values depending on measurement type and device support
CouplingCoupling mode of the channel

character vector of:

'AC'
'DC'
TerminalConfigChannel terminal configuration as described in Channel Configuration

character vector of:

'Differential'
'SingleEnded'
'SingleEndedNonReferenced'
'PseudoDifferential'
Current Input and Output
ShuntLocation(Only some vendors) Indicates if the shunt resistor is located internally on the device or externally

character vector of:

'Internal'
'External'
ShuntResistance(Only some vendors) Indicates shunt resistance in ohmsdouble

Other Analog Measurements

Thermocouple Measurement

Thermocouple measurement input channel objects also include these properties:

PropertyDescriptionValues
ThermocoupleTypeType of thermocouple based on temperature range and sensitivity, according to the NIST Thermocouple Types Definitions.

character vector of:

'J'
'K'
'N'
'R'
'S'
'T'
'B'
'E'
UnitsTemperature units

character vector of:

'Celsius' (default)
'Fahrenheit'
'Kelvin'
'Rankine'
RangeInput value rangedouble values depending on measurement type and device support

Accelerometer Measurement

Accelerometer measurement input channel objects also include these properties:

PropertyDescriptionValues
SensitivitySensitivity of accelerometer channel expressed as volts per g-force, V/gdouble
ExcitationCurrentCurrent to excite an IEPE accelerometer, IEPE microphone, generic IEPE sensor, or RTD, specified in amperes.double
ExcitationSourceIndicates source of excitation for IEPE sensor or RTD

character vector of:

'Internal'
'External'
'None'
'Unknown'
CouplingCoupling mode of the channel

character vector of:

'AC'
'DC'
TerminalConfigChannel input configuration as described in Channel Configuration

character vector of:

'Differential'
'SingleEnded'
'SingleEndedNonReferenced'
'PseudoDifferential'
RangeInput value rangedouble values depending on measurement type and device support

RTD Measurement

RTD measurement input channel objects also include these properties:

PropertyDescriptionValues
UnitsTemperature units

character vector of:

'Celsius' (default)
'Fahrenheit'
'Kelvin'
'Rankine'
RTDTypeSpecify the sensitivity of a standard RTD 100-ohm platinum sensor

character vector of:

'Pt3750'
'Pt3851'
'Pt3911'
'Pt3916'
'Pt3920'
'Pt3928'
RTDConfigurationSpecify the wiring configuration for measuring resistance

character vector of:

'TwoWire'
'ThreeWire'
'FourWire'
R0Specify the resistance of this device to a reference temperature

double

ExcitationCurrentCurrent to excite an IEPE accelerometer, IEPE microphone, generic IEPE sensor, or RTD, specified in amperesdouble
ExcitationSourceIndicates source of excitation for IEPE sensor

character vector of:

'Internal'
'External'
'None'
'Unknown'
CouplingCoupling mode of the channel

character vector of:

'AC'
'DC'
TerminalConfigChannel input configuration as described in Channel Configuration

character vector of:

'Differential'
'SingleEnded'
'SingleEndedNonReferenced'
'PseudoDifferential'
RangeInput value rangedouble values depending on measurement type and device support

Bridge Measurement

Bridge measurement input channel objects also include these properties:

PropertyDescriptionValues
BridgeModeBridge mode representing the active gauge of the analog input channel

character vector of:

'Full' — All four gauges are active.

'Half'— Only two bridges are active.

'Quarter'— Only one bridge is active.

ExcitationSourceIndicates source of excitation voltage

character vector of:

'Internal'
'External'
'None'
'Unknown'
ExcitationVoltage Indicates the excitation voltage value to apply to bridge measurementsdouble
NominalBridgeResistanceResistance of a bridge-based sensor in ohmsdouble
RangeRange of input valuesdouble values depending on measurement type and device support

Microphone Measurement

Microphone measurement input channel objects also include these properties:

PropertyDescriptionValues
SensitivityMicrophone channel sensitivity in volts per pascal, V/Padouble
MaxSoundPressureLevelMaximum sound pressure of the microphone channel in decibelsdouble
ExcitationCurrentCurrent to excite an IEPE accelerometer, IEPE microphone, generic IEPE sensor, or RTD, specified in amperes.double
ExcitationSourceIndicates source of excitation for IEPE sensor

character vector of:

'Internal'
'External'
'None'
'Unknown'
CouplingCoupling mode of the channel

character vector of:

'AC'
'DC'
TerminalConfigChannel input configuration as described in Channel Configuration

character vector of:

'Differential'
'SingleEnded'
'SingleEndedNonReferenced'
'PseudoDifferential'
RangeInput value rangedouble values depending on measurement type and device support

IEPE Measurement

IEPE measurement input channel objects also include these properties:

PropertyDescriptionValues
ExcitationCurrentCurrent to excite an IEPE accelerometer, IEPE microphone, generic IEPE sensor, or RTD, specified in amperes.double
ExcitationSourceIndicates source of excitation for IEPE sensor

character vector of:

'Internal'
'External'
'None'
'Unknown'
CouplingCoupling mode of the channel

character vector of:

'AC'
'DC'
TerminalConfigChannel input configuration as described in Channel Configuration

character vector of:

'Differential'
'SingleEnded'
'SingleEndedNonReferenced'
'PseudoDifferential'
RangeInput value rangedouble values depending on measurement type and device support

Digital Channels

Digital channel objects include the following properties:

PropertyDescriptionValues
DirectionDirection of data flow, changeable only for bidirectional channels

character vector of:

'Input'
'Output'

Counter Channels

All Counter Channels

Counter input and output channel objects also include these properties:

Edge Count

Counter input edge count channels also include the following properties:

PropertyDescriptionValues
ActiveEdgeIndicates rising or falling edge of edge count signal

character vector of:

'Rising'
'Falling'
CountDirectionIndicates counting up or down

character vector of:

'Increment'
'Decrement'
InitialCountValue to count fromuint32
TerminalTerminal on device

character vector, for example

'PFI2'

Frequency

Counter input frequency measurement channels also include the following properties:

PropertyDescriptionValues
ActiveEdgeIndicates rising or falling edge of edge count signal

character vector of:

'Rising'
'Falling'
TerminalTerminal on device

character vector, for example:

'PFI2'

Position

For an overview of position measurement, including signals, encoding types, and Z-indexing, see National Instruments® Encoder Measurements: How-To Guide. See also Measure Angular Position with an Incremental Rotary Encoder.

Counter input position measurement channels also include the following properties:

PropertyDescriptionValues
EncoderTypeSpecify the encoding type of the counter input

character vector of:

'X1'
'X2'
'X4'
'TwoPulse'
ZResetEnableAllow the Z-indexing to be reset logical
ZResetValueSpecify the reset value for Z-indexing on a counter inputnumeric
ZResetConditionSpecify reset conditions for Z-indexing of counter

character vector of:

'AHigh'
'BHigh'
'BothLow'
'BothHigh'
InitialCountSpecify the point from which the device starts the counterdouble value, typically 0
TerminalAExternal terminal on devicecharacter vector, for example: 'PFI0'
TerminalBExternal terminal on devicecharacter vector, for example: 'PFI1'
TerminalZExternal index terminal on device for zero or reference signalcharacter vector, for example: 'PFI2'

Pulse Width

Counter input pulse width measurement channels also include the following properties:

PropertyDescriptionValues
ActivePulseIndicates active level

character vector of:

'High'
'Low'
TerminalExternal terminal on devicecharacter vector, for example: 'PFI2'

Pulse Generation

Counter output pulse generation channels also include the following properties:

PropertyDescriptionValues
IdleStateIndicate the default state of the counter output channel when not running

character vector of:

'High'
'Low'
InitialDelaySpecify an initial delay on the counter output channel before pulse generationdouble value in seconds
FrequencySpecify the pulse repetition rate of a counter output channeldouble value in Hz
DutyCycleSpecify the fraction of time that the generated pulse is in active state, as a portion of 1.0. A square wave has a duty cycle of 0.5.double
TerminalExternal terminal on devicecharacter vector, for example, 'PFI2'

Audio Channels

Audio input and output channel objects also include these properties:

PropertyDescriptionValues
RangeInput/output value range-1.0 to +1.0

Function Generator Channels

Function generator channel objects also include these properties:

PropertyDescriptionValues
RangeOutput value rangedouble values depend on device support
TerminalConfigChannel input configuration as described in Channel Configuration

character vector of:

'Differential'
'SingleEnded'
'SingleEndedNonReferenced'
'PseudoDifferential'
Gain

Specify amplification of scan data for channel output.

double value between –5 and 5. Ensure that Gain x data + Offset falls within the valid Range of device output.

Offset

Specify offset of scan data for channel output.

double value between –5 and 5. Ensure that Gain x data + Offset falls within the valid Range of device output.

FrequencySpecify waveform frequencydouble value in Hz, within FrequencyLimit value
WaveformTypeSpecify waveform shape

character vector of:

'Sine'
'Square'
'Triangle'
'RampUp'
'RampDown'
'DC'
'Arbitrary'
FrequencyLimitMinimum and maximum rates that the function generation channel supportsdouble

See Also

Functions