Keysight VISA.NET Help
Open(String,AccessModes,Int32,ResourceOpenStatus) Method



The VISA resource name or an alias for a VISA resource defined in the Keysight Connection Expert utility.
The modes by which the resource is to be accessed.
The timeout in milliseconds. This applies to the time taken to acquire the requested lock, and may also include the time needed to open a session to the resource. If the timeout is VisaConstants.ImmediateTimeout (0), the method will not wait at all. If the timeout is VisaConstants.InfiniteTimeout (-1), the method will never timeout. Negative values other than -1 are treated as unsigned values in the range between Int32.MaxValue and UInt32.MaxValue.
The status of the open operation.
Create a VISA I/O resource session.
Syntax
'Declaration
 
Public Overloads Function Open( _
   ByVal resourceName As String, _
   ByVal accessModes As AccessModes, _
   ByVal timeoutMilliseconds As Integer, _
   ByRef openStatus As ResourceOpenStatus _
) As IVisaSession
'Usage
 
Dim instance As ResourceManager
Dim resourceName As String
Dim accessModes As AccessModes
Dim timeoutMilliseconds As Integer
Dim openStatus As ResourceOpenStatus
Dim value As IVisaSession
 
value = instance.Open(resourceName, accessModes, timeoutMilliseconds, openStatus)

Parameters

resourceName
The VISA resource name or an alias for a VISA resource defined in the Keysight Connection Expert utility.
accessModes
The modes by which the resource is to be accessed.
timeoutMilliseconds
The timeout in milliseconds. This applies to the time taken to acquire the requested lock, and may also include the time needed to open a session to the resource. If the timeout is VisaConstants.ImmediateTimeout (0), the method will not wait at all. If the timeout is VisaConstants.InfiniteTimeout (-1), the method will never timeout. Negative values other than -1 are treated as unsigned values in the range between Int32.MaxValue and UInt32.MaxValue.
openStatus
The status of the open operation.

Return Value

A reference to VISA.NET session for the specified resource.
Remarks

Some Keysight IO Libraries Connection Expert settings and Keysight Instrument Discovery Service policies affect the operation of Open. Refer to the IO Libraries Suite Help for more details.

For instruments that are auto-discovered by the Discovery Service, Open verifies that the instrument is present.

For instruments that are manually-added, Open does not verify the presence of the instrument. If the device is not present or not turned on, you will not discover this until you attempt to communicate with the instrument.

Requirements

Current with Keysight IO Libraries Suite 18

See Also

 

 


© Keysight Technologies 2015-2025