User`s guide

Table Of Contents
182 Chapter 12
Sample Application Programs
Controlling Using SICL-LAN Server
(4) retrieves the message terminator at the end of the data.
Example 12-5 EnterSiclLanArrayReal64
Function EnterSiclLanArrayReal64(addr As Integer, databuf() As Double)
As Long
Dim Status As Integer
Dim actualcnt As Long
Dim buf As String * 8
Dim size As Long
On Error GoTo ErrHandler
'''Read header info of "#6NNNNNN"
Status = iread(addr, buf, 8, I_TERM_MAXCNT, actualcnt)
'.................(1)
size = Val(Mid$(buf, 3, 6))
'.................(2)
'''Read data
Status = iread(addr, databuf, size, I_TERM_MAXCNT, actualcnt)
'.................(3)
'''Read ending LF
Status = iread(addr, buf, 1, I_TERM_MAXCNT, actualcnt)
'.................(4)
EnterSiclLanArrayReal64 = size / 8
Exit Function
ErrHandler:
MsgBox "*** Error : " & Error$
Call siclcleanup
End
End Function
Disconnection
The iclose function of SICL is used to disconnect communication. The iclose function
takes the session information outputted from the iopen function as its parameter.
Syntax Status = iclose(addr)
For information on the variable (Status) and the variable (addr), refer to Table 12-1,
“Variable (Status),” on page 179 and Table 12-2, “Variable (addr),” on page 179,
respectively.