Download AMPERR Amplifier error automatic subroutine

Transcript
ETHERNET
IH
Open IP Handle
IHm= n0,n1,n2,n3 <o >p
IHm= n <o >p
IHm= >p
Usage
IHm= n
_IHm0
_IHm1
Operands _IHm2
_IHm3
_IHm4
Arguments specified with a single axis mask and an assignment (=)
Operand has special meaning, see Remarks
Description
The IH command is used when the controller is operated as a master (client) to open a handle and connect to a slave (server).
Arguments
Argument
m
A
H
Default
N/A
S
T
N/A
0
0
0
0
2,147,483,648
255
255
255
255
0
0
0
0
2,147,483,647 0
1
Slave IP address as a 32 bit value
o
0
65,535
see Notes
1
p
1
2
2
1
-3
-1
N/A
1
Specify the slave port to connect
over
Specify the connection type to
open
Specify the connection type to
close when closing a handle
n0
n1
n2
n3
n
Min
Max
Resolution
Description
Handle
Handle to assign connection
Special handle designator used
Handle
when closing handles
1
Byte 3 of the slave IP address
1
Byte 2 of the slave IP address
1
Byte 1 of the slave IP address
1
Byte 0 of the slave IP address
Notes
See Remarks
If o is omitted, the controller selects
the port starting at 1000
n = 2 is TCP. n = 1 is UDP.
See Remarks
Remarks
All 4 bytes must be assigned for an IP address to be valid.
IHm=? returns the IP address as 4, 1-byte numbers.
Use the following equation to change the 4 byte IP (n0,n1,n2,n3) to a single 32 bit number, n.
n = (n0*2^24) + (n1*2^16) + (n2*2^8) + n3.
When using Modbus, port 502, note that Galil Modbus supports one master per slave.
Opening a Handle
To open a handle, the user must specify:
The IP address of the slave.
(optional) The port number of the slave. If not specified, the firmware will choose a port.
Modbus connections must always be specified as port 502.
(optional)The connection type as TCP/IP or UDP/IP. If not specified, the controller will make a TCP connection.
Issue the IH command on an available handle with the correct settings for IP (n0-n3), port (o) and connection type (p).
See TH to list handle status.
Closing a Handle
Closing a handle is done with the S and T handle identifiers, along with connection type p selector.
IHS => p closes the handle that sent the command with connection type matching > p
IHT => p closes all handles except for the one sending the command with connection type matching > p
For closing handles, use > p where p = -1 closes UDP handles, p = -2 closes TCP handles, and p = -3 closes all handle types
Operand Usage
Operand
Reported Value
_IHm0 -2147483648 to 2147483648
_IHm1 0 to 65535
_IHm2 0
1
2
-1
-2
Galil Motion Control
Description of Value
IP address of handle m as a 32 bit number (n)
Slave port number for handle m
Handle is free
Handle connected as UDP slave
Handle connected as TCP slave
Handle connected as UDP master
Handle connected as TCP master
IH
Notes
Handle 'Available' in TH
169/313