niModInst Open Installed Devices Session

ModInst

niModInst Open Installed Devices Session

Creates a handle to a list of installed devices supported by the specified driver. Call this VI and select the name of a National Instruments instrument driver, such as NI-SCOPE, from the driver control. This VI searches the system and constructs a list of all the installed devices that are supported by that driver, and returns both a handle and the number of devices found. The handle is used with other functions to query for attributes such as device name and model, and to safely discard the list when finished.

Note   This handle reflects the system state when the handle is created (that is, when you call this VI). If you remove devices from the system or rename them in Measurement & Automation Explorer (MAX), this handle may not refer to an accurate list of devices. You should destroy the handle using niModInst_Close Installed Devices Session and create a new handle using this VI.

driver specifies the driver whose supported devices you want to find. This string is not case-sensitive. Some examples are:

NI-SCOPE
niScope

NI-FGEN
niFgen

NI-HSDIO
niHSDIO

NI-DMM
niDMM

NI-SWITCH
niSwitch

Note  If you do not wire an input or an empty string for this parameter, NI-ModInst creates a list of all Modular Instruments devices installed in the system.
error in describes error conditions that occur before this VI or function runs.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.
source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.
session is the NI-ModInst session handle, which acts as a handle to the list of installed devices and is used in other NI-ModInst functions.
device count returns the number of devices found in the system that are supported by the driver specified in the driver parameter.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.