8-28 HP IBASIC Supplement
Interfacing with External Devices
Interfacing with an External Controller
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.
See the LAN Interface User’s Guide Supplement for more information.