User`s guide

Table Of Contents
178 Chapter 12
Sample Application Programs
Controlling Using SICL-LAN Server
Procedures in each step in Figure 12-4 are described below.
Connection
The procedure corresponding to connection is OpenSession (Example 12-2). OpenSession
establishes connection to the
E5061A/E5062A with the iopen function of SICL, using
SICL-LAN Address and IP Address entered in the part 1 in Figure 12-3. The iopen
function takes the address information of the
E5061A/E5062A you specify as its
parameters.
Syntax addr = iopen(dev)
Variable
For example, if the parameter (dev) is "lan[128.10.0.3]:hpib9,17," connection is made to
the address of 17 of the interface of hpib9 with the
E5061A/E5062A whose IP
address is 128.10.0.3 using the external controller whose SICL interface name is lan.
Example 12-2 OpenSession
Function OpenSession() As Integer
Dim ServAddr As String
Dim IpAddr As String
On Error GoTo ErrHandler
'''Get Sicl-Lan Address
Sheets("Sheet1").Select
Range("C2").Select
ServAddr = ActiveCell.FormulaR1C1
'''Get Ip Address
Sheets("Sheet1").Select
Range("C3").Select
IpAddr = ActiveCell.FormulaR1C1
OpenSession = iopen("lan[" & IpAddr & "]:hpib9," & ServAddr)
addr
Description Session information (output)
Data type Integer type
dev
Description Address information of the instrument you specify (input)
Data type Character string type
Grammar
sicl-name
*1
[ip-address
*2
]:interface
*3
,sicl-lan-address
*4
*1.The SICL interface name you have set with the Agilent I/O Libraries in external con-
trol.
*2.The IP address of the E5061A/E5062A.
*3.For the E5061A/E5062A, specify hpib9.
*4.The address of the E5061A/E5062A for control with the SICL-LAN server.