FANUC Robotics America GFK-1541B 用户手册

下载
页码 240
4-9
4
 
Command 3000 Example
Establish a channel (Channel 5) to a remote Modbus/TCP device at IP address 10.0.0.1.  Return
the COMMREQ Status word to %R10.
Dec     (Hex)
Word 1
00008  (0008)
Length of Channel command Data Block
Word 2
00000  (0000)
Always 0 (no-wait mode request)
Word 3
00008  (0008)
Memory type of CRS word (%R)
Word 4
00009  (0009)
CRS word address minus 1 (%R10)*
Word 5
00000  (0000)
Reserved
Word 6
00000  (0000)
Reserved
Word 7
03000  (0BB8) Open Modbus/TCP Client Connection
Word 8
00005  (0005)
Channel number  (5)
Word 9
00001  (0001)
Remote Device Address Type
Word 10
00004  (0004)
Length of Remote Device Address
Word 11
00010  (0010)
Numeric value of 1
st
 Octet
Word 12
00000  (0000)
Numeric value of 2
nd
 Octet
Word 13
00000  (0000)
Numeric value of 3
rd
 Octet
Word 14
00001  (0001)
Numeric value of 4
th
 Octet
* Word 4 (CRS word address) is the only zero-based address in the Command Block.  Only this
value requires subtracting 1 from the intended address.
(Word 7) Channel Command Number: 
 Word 7 is the command id for an Open Modbus/TCP
Client Connection COMMREQ. If successful a TCP connection with the specified device is
allocated.
(Word 8) Channel Number: 
 Word 8 specifies the channel number to allocate for the Modbus/TCP
Client connection. Channels 1-16 can be used for Client communications.
(Word 9) Address Type:
 Word 9 specifies the type of IP Address specified for the remote device.
A value of one (1) is required in this word.
(Word 10) Length of IP Address:
 Word 10 specifies the length of the IP Address. A value of
four (4) is required in this word.
(Word 11) IP Address 1
st
 Octet:
 Word 10 specifies the value of the first octet of the IP Address.
(Word 12) IP Address 2
nd
 Octet:
 Word 11 specifies the value of the second octet of the IP
Address.
(Word 13) IP Address 3rd Octet:
 Word 12 specifies the value of the third octet of the IP
Address.
(Word 14) IP Address 4th Octet:
 Word 13 specifies the value of the fourth octet of the IP
Address.
www.cadfamily.com    EMail:cadserv21@hotmail.com
The document is for study only,if tort to your rights,please inform us,we will delete