NI-SWITCH 19.0 .NET Framework 4.0 API Reference

Table of Contents

Connect Method

  • Updated2023-02-21
  • 3 minute(s) read
Connect Method
Creates a path between channel1 and channel2.

Namespace:  NationalInstruments.ModularInstruments.NISwitch
Assembly:  NationalInstruments.ModularInstruments.NISwitch.Fx40 (in NationalInstruments.ModularInstruments.NISwitch.Fx40.dll) Version: 19.0.0.49152 (19.0.0.49152)
Visual Basic (Declaration)
Public Sub Connect ( _
	channel1 As String, _
	channel2 As String _
)
C#
public void Connect(
	string channel1,
	string channel2
)

Parameters

channel1
Indicates one of the channel name of the desired path.
channel2
Indicates the name of the other channel name of the desired path.

Exceptions

ExceptionCondition
Ivi.Driver.IviCDriverException When an underlying IVI-C driver was called to perform an action, the IVI-C driver action did not succeed.
Ivi.Driver.SelectorNameException A repeated capability selector is expected, but the driver does not recognise the provided name.
Ivi.Swtch.AttemptToConnectSourcesException Both channels are connected to a different source.
Ivi.Swtch.CannotConnectToItselfException channel1 and channel2 are one and the same channel
Ivi.Swtch.ExplicitConnectionExistsException The two channels are already explicitly connected by calling either the Connect or SetPath methods.
Ivi.Swtch.IsConfigurationChannelException One of the channels is a configuration channel.
Ivi.Swtch.PathNotFoundException Driver cannot find a path between the two channels.
ObjectDisposedException The Connect was accessed after the associated NISwitch.NISwitch object was disposed.

See Also

Log in to get a better experience