Session Manager - Get Instrument Session
- Aktualisiert2025-07-21
- 3 Minute(n) Lesezeit
Session Manager - Get Instrument Session
Owning Palette: TestStand
Returns an ActiveX session object that represents the connection to the instrument driver or I/O resource for the logical name Session Name . Instrument session objects are named ActiveX objects that enable software modules to easily share instrument driver instances or instrument connection handles. If a session object already exists for the logical name, the VI returns a reference to it. Otherwise, the VI creates and returns a new session object.
Details
|
Session Name specifies the name of the instrument session for which to return the session object and driver handle. If Session Name refers to an IVI session, it must match the name in the IVI Configuration Store file exactly, without any variations in the case of the characters in the name. All other instrument session names are case-insensitive. |
|
Interface Level specifies the type of API handle to return. Valid values include 0 for DefaultInterface , 1 for ClassDriver , 2 for SpecificOwner , and 3 for IODriver . |
|
error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality. |
|
Driver Handle returns the the C-based instrument API handle to the driver for the interface level the Interface Level parameter specifies. The driver initializes if necessary. If the session does not support the interface level you request, the VI returns a zero-valued handle. |
|
Instrument Session returns the ActiveX session object. |
|
error out contains error information. This output provides standard error out functionality. |
Details
This VI also returns an integer driver handle you pass to the Session to Refnum function to obtain a LabVIEW refnum you can use to call instrument driver or I/O VIs. As long as a reference to a session object exists, any number of VIs or other code modules can independently access the driver handle of the session. The driver initializes only once and then closes automatically when the last reference to the session object releases. You can call the SessionMgr ActiveX server directly to perform more advanced operations, such as querying for a list of available session names.