Task.AddGlobalChannel Method
- Updated2023-02-21
- 1 minute(s) read
TaskAddGlobalChannel Method
Adds a preconfigured, global channel to the task.
Namespace: NationalInstruments.DAQmx
Assembly: NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302
Syntax
public Channel AddGlobalChannel( string channelName )
Public Function AddGlobalChannel ( channelName As String ) As Channel
Parameters
- channelName
- Type: SystemString
The name of the global channel to add to the task.
Return Value
Type: ChannelThe global Channel.
Exceptions
Exception | Condition |
---|---|
DaqException | The NI-DAQmx driver returned an error. |
Remarks
A task can contain global or local channels. Global channels are accessible to all tasks on the system. Local channels are accessible only to the task you use to create them.
Use local channels in a typical application. Use the create channel methods on AIChannels, AOChannels, DIChannels, DOChannels, CIChannels, or COChannels to create local channels and add them to the task. Use Measurement & Automation Explorer (MAX) to create, configure, and store global channels.