niDMM_init
ViStatus = niDMM_init(ViString Resource_Name, ViBoolean ID_Query, ViBoolean Reset_Device, ViSession* Instrument_Handle)
Purpose
This function completes the following tasks:
- Creates a new IVI instrument driver session.
- Opens a session to the device you specify for the Resource_Name parameter.
- If the ID_Query parameter is set to VI_TRUE (1), this function queries the instrument ID and checks that it is valid for this instrument driver.
- If the Reset_Device parameter is set to VI_TRUE (1), this function resets the instrument to a known state. Sends initialization commands to set the instrument to the state necessary for the operation of the instrument driver.
- Returns a ViSession handle that you use to identify the instrument in all subsequent instrument driver function calls.
Parameters
Input | ||||||||
Name | Type | Description | ||||||
Resource_Name | ViString | Contains the Resource_Name of the device to initialize. The Resource_Name is assigned in Measurement & Automation Explorer (MAX).
Refer to Related Documentation for the NI Digital Multimeters Getting Started Guide for more information about configuring and testing the DMM in MAX. Valid Syntax:
|
||||||
ID_Query | ViBoolean | Verifies that the
device you initialize is one that the driver supports. NI-DMM
automatically performs this query, so setting this parameter is not necessary. Defined Values:
|
||||||
Reset_Device | ViBoolean | Specifies whether to reset the instrument during the initialization procedure. Defined Values:
|
||||||
Output | ||||||||
Name | Type | Description | ||||||
Instrument_Handle | ViSession* | Returns a ViSession handle that you use to identify the instrument in all subsequent instrument driver function calls. |
Return Value
Name | Type | Description |
Status | ViStatus | Reports the Status of this operation. To obtain a text description of the status code, call niDMM_error_message. To obtain additional information concerning the error condition, use niDMM_GetError. |