GE GFK-1004B Manuel D’Utilisation

Page de 268
 4
4-11
GFK-1004B
Chapter 4  Programming Communications Requests
Establish Read Channel (2003)
The Establish Read Channel Command requests that a channel be associated with a
remote PLC and that data from the remote PLC be transferred (periodically) to the local
PLC. The Command Block specifies the period, the number of reads from the remote to
perform, and the timeout allowed in waiting for each transfer to complete.  The first
read is performed immediately, regardless of the period specified.
Example Command Block
Establish a channel (channel 5) to a  remote PLC at IP address 3.0.0.1.  Return the
COMMREQ Status word to %R10.  Read remote PLC registers %R50-%R57 to local PLC
registers %R100-%R107.  Repeat the read 10 times once every 7 seconds with a timeout
of 500 ms for each read. 
ÁÁÁÁÁ
ÁÁÁÁÁ
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
Dec     (Hex)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 1
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00017  (0011)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Length of Channel Command Data Block  (17 - 25 words)
ÁÁÁÁÁ
ÁÁÁÁÁ
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
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
02003  (07d3)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Establish Read Channel Command number
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 8
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00005  (0005)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Channel number  (5)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 9
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00010  (000A)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Number of read repetitions  (read 10 times)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 10
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00003  (0003)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Time units for read period  (3=seconds)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 11
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00007  (0007)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Number of time units for read period  (every 7 seconds)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 12
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00050  (0032)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Timeout for each read  (500 ms)
ÁÁÁÁÁ
Word 13
ÁÁÁÁÁÁ
00008  (0008)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Local PLC - memory type at which to store data (%R)
ÁÁÁÁÁ
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 14
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00100  (0064)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Local PLC - starting address at which to store data (%R100)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 15
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00008  (0008)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - memory type from which to read data (%R)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 16
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00050  (0032)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - starting address from which to read data (%R50)
ÁÁÁÁÁ
Word 17
ÁÁÁÁÁÁ
00008  (0008)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - number of memory units  (8 registers)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 18
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00001  (0001)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - PLC (node) address type  (IP Address)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 19
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00004  (0004)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - PLC (node) address length in words  (4)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 20
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00003  (0003)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - Register 1 of IP address  (3)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 21
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00000  (0000)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - Register 2 of IP address  (0)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 22
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00000  (0000)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - Register 3 of IP address  (0)
ÁÁÁÁÁ
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 23
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
00001  (0001)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - Register 4 of IP address  (1)
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 24 - 27
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - Program Name (needed for access to remote %P
or %L) (zero terminated and padded)
ÁÁÁÁÁ
ÁÁÁÁÁ
ÁÁÁÁÁ
Word 28 - 31
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Remote PLC - Program Block (needed for access to remote %L)
(zero terminated and padded)
* Word 4 (CRS word address) is the only zero-based address in the Command Block.
Only this address requires subtracting 1 from the intended address.
(Word 7) Channel Command Number: 
 Word 7 requests that a read channel be set up. If
the command is processed successfully, it will result in attempting the specified number
of transfers from the server to the client.
The term local PLC is
used here to identify the
client PLC
-the PLC
that initiates the
communications
request.
The term remote PLC
is used here to identify
the server PLC-the
PLC that responds to
the request.