Galil DMC-1400 用户手册

下载
页码 235
DMC-1400  Series Command Reference IH 
● 103   
IH 
FUNCTION: Open Internet Handle 
DESCRIPTION: 
The IH command is used when the DMC-1415, DMC-1416 or DMC-1425 is operated as a 
master (also known as a client).  This command opens a handle and connects to a slave. 
Each controller may have 6 handles open at any given time.  They are designated by the 
letters A through F.  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 or F 
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 2147483648.  This value is the 32 bit IP 
address and can be used instead of specifying the 4 address fields. 
IHS => C   closes the handle that sent the command; where C=-1 for UDP/IP, or C=-2 for 
TCP/IP. 
IHN => C   closes all handles except for the one sending the command; where C=-1 UDP, or 
C=-2 for 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, and –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 -5 while establishing UDP handle 
 
 
contains -6 while establishing TCP handle 
_IHh3 
contains a 0 if the ARP was successful  
 
 
contains a 1 if it has failed or is still in progress.