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 range and 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:
Property | Description | Values |
---|---|---|
Name | Channel name | character vector constructed of device ID and channel ID |
ID | Channel identifier corresponding to device terminal ID | character vector, for example: 'ai0' 'ao3' 'Port2/Line1' 'ctr0' |
Device | DeviceInfo object for device with this
channel | DeviceInfo object handle |
MeasurementType | Type 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:
Property | Description | Values |
---|---|---|
Range | Input value range | Vector of two double values specifying minimum and maximum, depending on measurement type and device support. For example: ch.Range = [-5 5] |
Coupling | Coupling mode of the channel | character vector of: 'AC' 'DC' |
TerminalConfig | Channel terminal configuration as described in Channel Configuration | character vector of: 'Differential' 'SingleEnded' 'SingleEndedNonReferenced' 'PseudoDifferential' |
Current Measurement
Current measurement channel objects also include these properties:
Property | Description | Values |
---|---|---|
Current Input | ||
Range | Input value range | Vector of two double values specifying minimum and maximum, depending on measurement type and device support. For example: [-0.1 0.1] |
Coupling | Coupling mode of the channel | character vector of: 'AC' 'DC' |
TerminalConfig | Channel 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 ohms | double |
Other Analog Measurements
Thermocouple Measurement
Thermocouple measurement input channel objects also include these properties:
Property | Description | Values |
---|---|---|
ThermocoupleType | Type 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' |
Units | Temperature units | character vector of: 'Celsius' (default) 'Fahrenheit' 'Kelvin' 'Rankine' |
Range | Input value range | Vector of two double values specifying minimum and maximum, depending on measurement type and device support. For example: [-1 1] |
Accelerometer Measurement
Accelerometer measurement input channel objects also include these properties:
Property | Description | Values |
---|---|---|
Sensitivity | Sensitivity of accelerometer channel expressed as volts per g-force, V/g | double |
ExcitationCurrent | Current to excite an IEPE accelerometer, IEPE microphone, generic IEPE sensor, or RTD, specified in amperes. | double |
ExcitationSource | Indicates source of excitation for IEPE sensor or RTD | character vector of: 'Internal' 'External' 'None' 'Unknown' |
Coupling | Coupling mode of the channel | character vector of: 'AC' 'DC' |
TerminalConfig | Channel input configuration as described in Channel Configuration | character vector of: 'Differential' 'SingleEnded' 'SingleEndedNonReferenced' 'PseudoDifferential' |
Range | Input value range | Vector of two double values specifying minimum and maximum, depending on measurement type and device support. For example: [-1 1] |
RTD Measurement
RTD measurement input channel objects also include these properties:
Property | Description | Values |
---|---|---|
Units | Temperature units | character vector of: 'Celsius' (default) 'Fahrenheit' 'Kelvin' 'Rankine' |
RTDType | Specify the sensitivity of a standard RTD 100-ohm platinum sensor | character vector of: 'Pt3750' 'Pt3851' 'Pt3911' 'Pt3916' 'Pt3920' 'Pt3928' |
RTDConfiguration | Specify the wiring configuration for measuring resistance | character vector of: 'TwoWire' 'ThreeWire' 'FourWire' |
R0 | Specify the resistance of this device to a reference temperature | double |
ExcitationCurrent | Current to excite an IEPE accelerometer, IEPE microphone, generic IEPE sensor, or RTD, specified in amperes | double |
ExcitationSource | Indicates source of excitation for IEPE sensor | character vector of: 'Internal' 'External' 'None' 'Unknown' |
Coupling | Coupling mode of the channel | character vector of: 'AC' 'DC' |
TerminalConfig | Channel input configuration as described in Channel Configuration | character vector of: 'Differential' 'SingleEnded' 'SingleEndedNonReferenced' 'PseudoDifferential' |
Range | Input value range | Vector of two double values specifying minimum and maximum, depending on measurement type and device support. For example: [-1 1] |
Bridge Measurement
Bridge measurement input channel objects also include these properties:
Property | Description | Values |
---|---|---|
BridgeMode | Bridge mode representing the active gauge of the analog input channel | character vector of:
|
ExcitationSource | Indicates source of excitation voltage | character vector of: 'Internal' 'External' 'None' 'Unknown' |
ExcitationVoltage | Indicates the excitation voltage value to apply to bridge measurements | double |
NominalBridgeResistance | Resistance of a bridge-based sensor in ohms | double |
Range | Range of input values | Vector of two double values specifying minimum and maximum, depending on measurement type and device support. For example: [-1 1] |
Microphone Measurement
Microphone measurement input channel objects also include these properties:
Property | Description | Values |
---|---|---|
Sensitivity | Microphone channel sensitivity in volts per pascal, V/Pa | double |
MaxSoundPressureLevel | Maximum sound pressure of the microphone channel in decibels | double |
ExcitationCurrent | Current to excite an IEPE accelerometer, IEPE microphone, generic IEPE sensor, or RTD, specified in amperes. | double |
ExcitationSource | Indicates source of excitation for IEPE sensor | character vector of: 'Internal' 'External' 'None' 'Unknown' |
Coupling | Coupling mode of the channel | character vector of: 'AC' 'DC' |
TerminalConfig | Channel input configuration as described in Channel Configuration | character vector of: 'Differential' 'SingleEnded' 'SingleEndedNonReferenced' 'PseudoDifferential' |
Range | Input value range | Vector of two double values specifying minimum and maximum, depending on measurement type and device support. For example: [-1 1] |
IEPE Measurement
IEPE measurement input channel objects also include these properties:
Property | Description | Values |
---|---|---|
ExcitationCurrent | Current to excite an IEPE accelerometer, IEPE microphone, generic IEPE sensor, or RTD, specified in amperes. | double |
ExcitationSource | Indicates source of excitation for IEPE sensor | character vector of: 'Internal' 'External' 'None' 'Unknown' |
Coupling | Coupling mode of the channel | character vector of: 'AC' 'DC' |
TerminalConfig | Channel input configuration as described in Channel Configuration | character vector of: 'Differential' 'SingleEnded' 'SingleEndedNonReferenced' 'PseudoDifferential' |
Range | Input value range | vector of two double values specifying minimum and maximum, depending on measurement type and device support |
Digital Channels
Digital channel objects include the following properties:
Property | Description | Values |
---|---|---|
Direction | Direction 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:
Property | Description | Values |
---|---|---|
ActiveEdge | Indicates rising or falling edge of edge count signal | character vector of: 'Rising' 'Falling' |
CountDirection | Indicates counting up or down | character vector of: 'Increment' 'Decrement' |
InitialCount | Value to count from | uint32 |
Terminal | Terminal on device | character vector, for example 'PFI2' |
Frequency
Counter input frequency measurement channels also include the following properties:
Property | Description | Values |
---|---|---|
ActiveEdge | Indicates rising or falling edge of edge count signal | character vector of: 'Rising' 'Falling' |
Terminal | Terminal 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:
Property | Description | Values |
---|---|---|
EncoderType | Specify the encoding type of the counter input | character vector of: 'X1' 'X2' 'X4' 'TwoPulse' |
ZResetEnable | Allow the Z-indexing to be reset | logical |
ZResetValue | Specify the reset value for Z-indexing on a counter input | numeric |
ZResetCondition | Specify reset conditions for Z-indexing of counter | character vector of: 'AHigh' 'BHigh' 'BothLow' 'BothHigh' |
InitialCount | Specify the point from which the device starts the counter | double value, typically 0 |
TerminalA | External terminal on device | character vector, for example: 'PFI0' |
TerminalB | External terminal on device | character vector, for example: 'PFI1' |
TerminalZ | External index terminal on device for zero or reference signal | character vector, for example: 'PFI2' |
Pulse Width
Counter input pulse width measurement channels also include the following properties:
Property | Description | Values |
---|---|---|
ActivePulse | Indicates active level | character vector of: 'High' 'Low' |
Terminal | External terminal on device | character vector, for example: 'PFI2' |
Pulse Generation
Counter output pulse generation channels also include the following properties:
Property | Description | Values |
---|---|---|
IdleState | Indicate the default state of the counter output channel when not running | character vector of: 'High' 'Low' |
InitialDelay | Specify an initial delay on the counter output channel before pulse generation | double value in seconds |
Frequency | Specify the pulse repetition rate of a counter output channel | double value in Hz |
DutyCycle | Specify 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 |
Terminal | External terminal on device | character vector, for example, 'PFI2' |
Audio Channels
Audio input and output channel objects also include these properties:
Property | Description | Values |
---|---|---|
Range | Input/output value range | [-1.0 1.0] |
Function Generator Channels
Function generator channel objects also include these properties:
Property | Description | Values |
---|---|---|
Range | Output value range | Vector of two double values specifying minimum and maximum, depending on measurement type and device support. For example: [-5 5] |
TerminalConfig | Channel 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 |
Offset | Specify offset of scan data for channel output. | double value between |
Frequency | Specify waveform frequency | double value in Hz, within FrequencyLimit
value |
Phase | Specify waveform phase shift in degrees | double, from 0 to 360 |
WaveformType | Specify waveform shape | character vector of: 'Sine' 'Square' 'Triangle' 'RampUp' 'RampDown' 'DC' 'Arbitrary' |
FrequencyLimit | Minimum and maximum rates that the function generation channel supports | double |