Keysight VISA.NET Help
PxiSession Constructor(String,AccessModes,TimeSpan)



The descriptor of the resource to which this class will be connected.
The modes by which the resource is to be accessed. ExclusiveLock is used to acquire an exclusive lock immediately upon opening a session. LoadConfig is used to configure attributes to values specified by some external configuration utility. The default is None.
If the accessMode parameter requests an exclusive lock, this parameter specifies the absolute time period that the constructor waits for a locked resource to be unlocked before throwing an exception; otherwise, this parameter is ignored. If the time span in milliseconds is 0, operations will never wait for the lock. If the time span is TimeSpan.MaxValue or the time span in milliseconds is greater than or equal to UInt32.MaxValue, the attempt to wait for the lock will never timeout. Negative time spans are not valid.
Performs the operations necessary to instantiate a PxiSession class.
Syntax
'Declaration
 
Public Function New( _
   ByVal resourceName As String, _
   ByVal accessModes As AccessModes, _
   ByVal timeout As TimeSpan _
)
'Usage
 
Dim resourceName As String
Dim accessModes As AccessModes
Dim timeout As TimeSpan
 
Dim instance As New PxiSession(resourceName, accessModes, timeout)

Parameters

resourceName
The descriptor of the resource to which this class will be connected.
accessModes
The modes by which the resource is to be accessed. ExclusiveLock is used to acquire an exclusive lock immediately upon opening a session. LoadConfig is used to configure attributes to values specified by some external configuration utility. The default is None.
timeout
If the accessMode parameter requests an exclusive lock, this parameter specifies the absolute time period that the constructor waits for a locked resource to be unlocked before throwing an exception; otherwise, this parameter is ignored. If the time span in milliseconds is 0, operations will never wait for the lock. If the time span is TimeSpan.MaxValue or the time span in milliseconds is greater than or equal to UInt32.MaxValue, the attempt to wait for the lock will never timeout. Negative time spans are not valid.
Remarks

This constructor attempts to open a connection to the specified resource with the specified access modes and timeout.

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

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

For instruments that are manually added, the constructor 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