Specifications
248 Chapter 15
Controlling Peripherals
Programming with VISA
STEP 1. Starting up VISA system
The VISA system startup session is processed in Lines 150 to 160 in Example 15-1.
VISA’s viOpenDefaultRM function initializes and starts up the VISA system. The
viOpenDefaultRM function must be executed before other VISA functions are called, and
the parameter of this function is startup information (Defrm in
Example 15-1).
Syntax viOpenDefaultRM(param)
Parameter
STEP 2. Connection
The connection session is handled in Lines 190 to 200 in Example 15-1. VISA’s viOpen
function makes connection with the specified instrument. The viOpen function returns a
value so that the VISA functions can apply it to the specified instrument. The parameters of
this function are startup information (Defrm in
Example 15-1), the address information of
the specified instrument (“GPIB0::5::INSTR” in Example 15-1), access mode (0 in
Example 15-1), timeout (0 in Example 15-1), and connection information (Dcps in
Example 15-1).
Syntax viOpen(param1,param2,param3,param4,param5)
Parameters
(param)
Description Startup information (output)
Data type Long integer type
(param1)
Description Startup information (input)
Data type Long integer type
(param2)
Description Address information of the specified instrument (input)
Data type Character string type
Syntax
GPIB[board]
*1
::primary address
*2
::INSTR
*1.GPIB0 for the E4991A.
*2.The GPIB address of the instrument controlled by the E4991A.
(param3)
Description Access mode (Enter 0)