Obtains a multithread lock on the instrument session and specifies the maximum amount of time to wait to acquire the lock.

Syntax

Namespace: NationalInstruments.ModularInstruments.NIRfsg

public RfsgDriverLock Lock(Ivi.Driver.PrecisionTimeSpan maxTime)

Remarks

This method waits until all other execution threads have released their locks on the instrument session before it obtains a multithread lock on the instrument session.

Parameters

NameTypeDescription
maxTimeIvi.Driver.PrecisionTimeSpan

Specifies the maximum amount of time to wait to acquire the lock.

Returns

An RfsgDriverLock object, that has the Unlock method.

Exceptions

TypeDescription
System.ObjectDisposedException

The Lock method was accessed after the associated NIRfsg object was disposed.