Establish read channel (2003), Example 1 command block–basic example – GE 90-30 PLC User Manual
Page 44

3
3-11
GFK-1084B
Chapter 3 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 1 Command Block–Basic Example
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 unit 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 - Network address type (IP Address)
БББББ
БББББ
Word 19
ББББББ
ББББББ
00004 (0004)
БББББББББББББББББББ
БББББББББББББББББББ
Remote PLC - Network 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.