Agilent Technologies ES Switch User Manual


 
6-24 LAN Interface Supplement
Controlling the Analyzer via the LAN
IBASIC Communication across the LAN
IBASIC Communication across the LAN
You may need a way for an IBASIC program running on the analyzer to
signal a remote computer that it has completed some operation.
IBASIC cannot communicate directly across LAN using the ASSIGN and
OUTPUT or ENTER commands. However, IBASIC can use the following
SCPI command to send a message to a remote computer via LAN:
DIAGnostic:COMMunicate:LAN:SEND <IP_ADDR>,<PORT_NUM>,<STRING>
This command opens a socket to the remote computer, and sends the
specified string. The <IP_ADDR> argument specifies the IP address of the
remote computer. The <PORT_NUM> argument specifies the port number
to use. The <STRING> is the message to be sent.
For example:
DIAGnostic:COMMunicate:LAN:SEND ‘15.4.40.49’,8001,’Ready!’
If the remote computer is not listening for a LAN connection at the
specified port, this command will block, and wait for the remote
computer to accept the connection. After about 75 seconds, it will time
out. This is the standard TCP/IP timeout period.
The following IBASIC example program demonstrates LAN
communication using IBASIC.
The section “Controlling Multiple Analyzers using a Perl Script” on page
6-28 shows an example of a program that monitors the LAN for a
response from an IBASIC program.
NOTE This program is included on the Example Programs Disk shipped with
your analyzer as LAN_SEND.