124
●
IH
DMC-40x0 Command Reference
IH
FUNCTION:
Open Internet Handle
DESCRIPTION:
The IH command is used when the controller is operated as a master (also known as a client).
This command opens a handle and connects to a slave.
Each controller may have 8 handles open at any given time. They are designated by the letters A
through H. To open a handle, the user must specify:
1.
The IP address of the slave
2.
The type of session: TCP/IP or UDP/IP
3.
The port number of the slave. This number is not necessary if the slave device does not
require a specific port value. If not specified, the controller will specify the port value as
1000.
ARGUMENTS:
IHh= ip0,ip1,ip2,ip3 <p >q
or
IHh=n <p >q
or
IHh= >r where
h is the handle, specified as A,B,C,D,E, F, G, or H
ip0,ip1,ip2,ip3 are integers between 0 and 255 and represent the individual fields of the IP address.
These values must be separated by commas.
n is a signed integer between - 2147483648 and 2147483647. This value is the 32 bit IP address
and can be used instead of specifying the 4 address fields.
IHS => r closes the handle that sent the command; where r = -1 for UDP/IP, or r = -2 for TCP/IP.
IHT => r closes all handles except for the one sending the command; where r = -1 UDP, or r = -
2 TCP.
<p specifies the port number of the slave where p is an integer between 0 and 65535. This value is
not required for opening a handle.
>q specifies the connection type where q is 0 for no connection, 1 for UDP and 2 for TCP
>r specifies that the connection be terminated and the handle be freed, where r is -1 for UDP, -2
for TCP/IP, or -3 for TCP/IP Reset
"?" returns the IP address as 4 1-byte numbers
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 while attempting to establish a UDP handle
contains a -6 while attempting to establish a TCP/IP handle
Summary of Contents for DMC-40x0 Series
Page 2: ......
Page 4: ......
Page 10: ...vi i Table of Contents DMC 40x0 Command Reference This Page is Left Blank Intentionally ...