| Contents | Index |
Add analog input channel
s.addAnalogInputChannel(deviceID, channelID, measurementType)
ch = s.addAnalogInputChannel(deviceID, channelID, measurementType)
[ch, idx] = s.addAnalogInputChannel(deviceID, channelID, measurementType)
s.addAnalogInputChannel(deviceID, channelID, measurementType) adds a channel on the device represented by deviceID, with the specified channelID, and channel measurement type, represented by measurementType, to the session s. Measurement types are vendor specific.
ch = s.addAnalogInputChannel(deviceID, channelID, measurementType) creates and displays the object ch.
[ch, idx] = s.addAnalogInputChannel(deviceID, channelID, measurementType) creates and displays the object ch, representing the channel that was added and the index, idx, which is an index into the array of the session object's Channels property.
Use daq.createSession to create a session object before you use this method.
To use counter channels, see .
deviceID |
Specify the vendor-defined ID of the device on the CompactDAQ chassis. The specified channel is created for this device. The device ID is the ID of the device that you obtain by calling daq.getDevices. |
channelID |
Specify the ID of the channel added to the device. You can also add a range of channels. For NI devices, use either a terminal name, like 'ai2', or a numeric equivalent like 2 for the channel ID. |
measurementType |
Specify a string that represents a vendor-defined measurement type. Measurement types include:
|
ch |
Object representing the channel you added. |
idx |
An index into the array of the session object's Channels property. |
| ADCTimingMode | Set channel timing mode |
| BridgeMode | Specify analog input device bridge mode |
| Coupling | Specify input coupling mode |
| Device | Analog and counter channel device |
| ExcitationCurrent | Voltage of external source of excitation |
| ExcitationSource | External source of excitation |
| ExcitationVoltage | Voltage of excitation source |
| ExternalTriggerTimeout | Indicate if external trigger timed out |
| ID | Analog and counter channel ID |
| InputType | Specify analog input hardware channel configuration |
| MaxSoundPressureLevel | Sound pressure level for microphone channels |
| MeasurementType | Type counter channel measurement |
| Name | Specify descriptive name for the channel |
| NominalBridgeResistance | Resistance of sensor |
| R0 | Specify resistance value |
| Range | Specify channel measurement range |
| RTDConfiguration | Specify wiring configuration of RTD device |
| RTDType | Specify sensor sensitivity |
| ScansAcquired | Number of scans acquired during operation |
| Sensitivity | Sensitivity of an analog channel |
| ShuntLocation | Indicate location of channel's shunt resistor |
| ShuntResistance | Resistance value of channel's shunt resistor |
| ThermocoupleType | Select thermocouple type |
| Units | Specify unit of RTD measurement |
Add an analog input current channel:
s = daq.createSession ('ni')
s.addAnalogInputChannel('cDAQ1Mod3','ai0', 'Current');Add an analog input thermocouple channel. Specify output arguments to represent the channel object and the index:
s = daq.createSession ('ni')
[ch, idx] = s.addAnalogInputChannel('cDAQ2Mod6', 'ai0', 'Thermocouple')
Add analog input voltage channels 0, 2, and 4:
s = daq.createSession ('ni')
s.addAnalogInputChannel('cDAQ1Mod1',[0 2 4], 'Voltage');daq.Session | daq.Session.addAnalogOutputChannel | daq.Session.removeChannel | daq.Session.startBackground | daq.Session.startForeground

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |