GE GFK-1541B manual Example 2 Command Block-Example using a Network Address Name

Models: GFK-1541B

1 240
Download 240 pages 31.35 Kb
Page 82
Image 82

3

Example 2 Command Block–Example using a Network Address Name

This example is the same as Example 1 except that the Network Address name of the Remote PLC (“PLC_1aa”) is used instead of its IP address. For more information on Network Address names, see the chapter: “Network Administration Support”.

Establish a channel (Channel 5) to a remote PLC with a Network Address name of “PLC_1aa”. 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.

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 communications request.

 

Dec

(Hex)

 

Word 1

00045

(002D)

Length of Channel command Data Block (45–53 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

00003

(0003)

Remote PLC - Network Address type (3=Symbolic Name)

Word 19

00032

(0020)

Remote PLC - Network Address length in words (32)

Word 20

19536

(4C50)

Remote PLC - Network Address name, char 1–2 (“PL”)

Word 21

24387

(5F43)

Remote PLC - Network Address name, char 3–4 (“C_”)

Word 22

24881

(6131)

Remote PLC - Network Address name, char 5–6 (“1a”)

Word 23

00097

(0061)

Remote PLC - Network Address name, char 7–8 (“a ”)

Word 24

00000

(0000)

Remote PLC - Network Address name, char 9–10

Word 25

00000

(0000)

Remote PLC - Network Address name, char 11–12

Word 26

00000

(0000)

Remote PLC - Network Address name, char 13–14

Word 27

00000

(0000)

Remote PLC - Network Address name, char 15–16

Word 28

00000

(0000)

Remote PLC - Network Address name, char 17–18

Word 29

00000

(0000)

Remote PLC - Network Address name, char 19–20

Word 30

00000

(0000)

Remote PLC - Network Address name, char 21–22

Word 31

00000

(0000)

Remote PLC - Network Address name, char 23–23

Word 32

00000

(0000)

Remote PLC - Network Address name, char 24–25

Word 33

00000

(0000)

Remote PLC - Network Address name, char 26–27

Word 34

00000

(0000)

Remote PLC - Network Address name, char 28–29

Word 35

00000

(0000)

Remote PLC - Network Address name, char 30–31

Word 36–51

 

 

Reserved: set to zero

Word 52–55

 

 

Remote PLC - Program Name (needed for access to

 

 

 

remote %P or %L) (zero-terminated and padded)

Word 56–59

 

 

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 value requires subtracting 1 from the intended address.

GFK-1541B

Chapter 3 Programming Channel Commands

3-15

Page 82
Image 82
GE GFK-1541B manual Example 2 Command Block-Example using a Network Address Name