Ih (internet handle), Setting, The ip address of the slave – Yaskawa LEGEND-MC User Manual
Page 139: The type of session: tcp/ip or udp/ip, Ihh0 contains the ip address as a 32 bit number, Ihh1 contains the slave port number, Ihh2 contains a 0 if the handle is free, Contains a 1 if it is for a udp slave, Contains a 2 if it is for a tcp slave, Contains a -1 if it is for a udp master
129
LEGEND-MC User’s Manual
IH (Internet Handle)
[Setting]
DESCRIPTION:
The IH command is used when the LEGEND-MC is operated as a network master. This command opens a
handle and connects to a slave.
Each controller may have 16 handles open at any given time. They are designated by the letters A through
P. To open a handle, the user must specify:
The IP address of the slave
The type of session: TCP/IP or UDP/IP
The port number of the slave. This number isn’t necessary if the slave device doesn’t
require a specific port value. If not specified, the controller specifies the port value as
502.
ARGUMENTS: IHh= ip0, ip1, ip2, ip3
q or IHh=n
q orIHh= >r where
OPERAND USAGE:
_IHh0 contains the IP address as a 32 bit number
_IHh1 contains the slave port number
_IHh2 contains a 0 if the handle is free
contains a 1 if it is for a UDP slave
contains a 2 if it is for a TCP slave
contains a -1 if it is for a UDP master
contains a -2 if it is for a TCP master
contains a -5 if attempting to connect by UDP
contains a -6 if attempting to connect by TCP
_IHh3 contains a 0 if the ARP was successful
contains a 1 if it has failed or is still in progress.
Argument
Minimum
Maximum
Note
h
A
P
Internet handle
ip0 - ip3
0
255
Four bytes of IP address separated by
commas
n
-2147483648
2147483647
32 bit address alternative to ip0 - ip3
S=>C
-1 (UDP)
-2 (TCP)
Close the handle that sent the command
T=>C
-1 (UDP)
-2 (TCP)
Close handles except the one sending the
command
0
65535
Specifies the port number of the slave,
not required for opening a handle
>q
0
2
Set connection type; 0=none; 1=UDP;
2=TCP
>r
-1 (UDP)
-2 (TCP)
Terminate connection, and handle to be
freed
?
Returns the IP address as four 1 byte
numbers