Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 27 of 31

DF1 Protocol and Command Set Reference Manual: 13 - PLC Addressing, pages 225 to 232

Pages 225 to 232 of 251, from DF1 Protocol and Command Set Reference Manual

The original document is the PDF (2.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Allen-Bradley 5250-LP and Allen-Bradley 5250-MLP1

Page 225

13–10

PLC Addressing

PLC-5 Logical Addressing PLC-5 processors, like PLC-3 processors, use a form of logical addressing. With logical addressing, you specify the address for each level (or sub-division) of PLC-5 memory, down to the smallest subdivision you want to access: With this processor PLC-5 PLC-5/250

You can specify up to 4 levels of extended addressing, which is enough to address any word in PLC-5 memory. 7 levels of extended addressing, which is enough to address any word in PLC-5/250 memory.

To send a command message to a PLC-5 node, you put the extended address of the node in the field labelled PLC-5 SYSTEM ADDRESS in the message block formats of your program. (See Chapter 7, “Communication Commands.”) There are two types of PLC-5 logical addressing: Logical Addressing Type logical binary addressing logical ASCII addressing

Publication 1770-6.5.16 - October 1996

Processors

Description

Page

PLC-5

A series of bytes used to encode up to 4 levels of an address.

13-11

PLC-5/250

A series of bytes used to encode up to 7 levels of an address.

13-13

PLC-5 and PLC-5/250

User-specified address in the same form that you use at the programming node. This addressing lets any device communicate with any other device, without knowing the internal memory structure of the target device.

13-15

Page 226

PLC Addressing

13–11

PLC-5 Logical Binary Addressing Byte 1

Contents the mask byte This byte determines which four levels of the address are specified. The mask is read from the LSB to the MSB. If a level of an address is not specified, it uses the default value, which is always 0, except for the file number which has a default of 1. You must always specify the last level of an address (even if it is a 0) so that the actual number of levels in a particular address can be determined. A 1 in the mask bit corresponding to a particular address level signifies that that particular address level is encoded in the bytes which follow. Only those address levels with a 1 in the corresponding mask bit are encoded. For example: •00001111 means that there are 4 levels in the address and all 4 levels are encoded •00000101 means there are 3 levels in the address and level 2 uses the default value (the default is always 0 for level 2). Only levels 1 and 3 are encoded. This byte is required.

2 the first level of the address not using the default value

...N up to 4 levels of addressing

Important:

If the value of the mask or a level of the address is greater than or equal to 255, you cannot encode it into 1 byte. You must flag this case by programming an FF hex at the level address to signify that the level address is greater than or equal to 255 and the next 2 bytes will contain the level address. Then, code the level into the following two bytes. After 255 (FF hex), you send the bytes with low byte first, high byte second.

The following figures show examples of PLC-5 logical binary addresses.

Publication 1770-6.5.16 - October 1996

Page 227

13–12

PLC Addressing

PLC-5 Logical Binary Address to Access the Address N7:30 Byte mask byte: indicates 3 levels of addressing will be encoded.

1

0 0

0 0

0

1 1

1

2

0 0

0 0

0

0 0

0 level 1 (value = 0); data table

3

0 0

0 0

0

1 1

1 level 2 (value = 7); file

4

0

0 1

1

1 1

0 level 3 (value = 30); element or word

0

0

7

30

0 Data table area = level 1 7 File = level 2 30 Element = level 3

PLC-5 Logical Binary Address to Access the Address B3:300 Byte mask byte: indicates 3 levels in the address. Level 1 uses the default (0). Therefore, only levels 2 and 3 will be encoded.

1

0 0

0 0

0

1 1

0

2

0

0

0 0

0

0 1

3

1

1

1 1

1

1 1

1 level 2 (value = 3); file FF flag indicating the next level is too large (300) to encode 1 in one byte so it will be encoded into the next 2 bytes.

4

0

0

1 0

1

1 0

0

5

0

0

0 0

0

0 0

1 level 3, high byte (value = 256); element or word level 3, low byte (value = 44); element or word

PLC-5 Logical Binary Address to Access the Address T4:2.ACC Byte mask byte: indicates 4 levels of addressing to encode.

1

0 0

0 0

1

1 1

1

2

0 0

0 0

0

0 0

0 level 1 (value = 0); data table

3

0 0

0 0

0

1 0

0 level 2 (value = 4); section

4

0 0

0 0

0

0 1

0

5

0

0 0

0

0 1

0 level 4 (value = 2); sub-elementÀ

0 level 3 (value = 2); element or word

➀ Sub-element: 00 = control, 01 = preset, 02 = accumulative.

PLC-5 Logical Binary Address to Access the Address PD12:10.SP Byte mask byte: indicates 4 levels of addressing to encode.

1

0 0

0 0

1

1 1

1

2

0 0

0 0

0

0 0

0 level 1 (value = 0); data table

3

0 0

0 0

1

1 0

0 level 2 (value = 12); section

4

0 0

0 0

1

0 1

0 level 3 (value = 10); element or word

5

0

0 0

0

0 1

0 level 4 (value = 2); sub-element➀

0

➀ Sub-element: 00 = control, 0 = preset, 02 = accumulative.

Publication 1770-6.5.16 - October 1996

Page 228

PLC Addressing

13–13

PLC-5 Memory (for use with figures on page 13-12 ) level 1 level 2 level 3 level 4

0 (data table)

file number element number sub-element number

Default files 0 output 1 input 2 status 3 binary 4 timer 5 counter 6 control 7 integer 8 float

0 - 999

9 - 999 user config timer/counter 0 control 1 preset 2 accumulated control 0 control 1 length 2 position

PD➀ 0, 1 control 2 SP 4 Kp 6 Ki 8 Kd 26 PV

BT 0 control 1 RLEN 2 DLEN 3 data file # 4 element # 5 rack/grp/slot

$ N 10 : 360 Displayed logical address symbol File-type identifier File number Delimiter Element number

MG 0 control 1 error 2 RLEN 3 DLEN ➀ All PD values are floating point values, so they are two words long.

PLC-5/250 Logical Binary Addressing Byte 1

Contents mask byte The LSB determines whether the module ID byte is specified or use the default value, which is always 0; bits 1 through 7 are associated with levels one through seven of a PLC-5/250 extended address. You must always specify the last level of an address (even if it is a 0) so that the actual number of levels in a particular address can be determined. If a bit is set to 0, then a default value is assumed for the corresponding address level. If a bit is set to 1, then you must specify a value for the corresponding address level in the bytes which follow. Only those address levels and the module ID byte with a 1 in the corresponding mask bit are encoded. For example: •01111111 means that the module ID byte and 7 levels are specified. •00111010 means the module ID byte uses the default value. There are 7 levels in the address, and level 2 uses the default value (the default is always 0). This byte is required.

2 the module ID byte if there is a 1 in the LSB of the mask byte; otherwise, it contains the first level of the address not using the default value Module ID Byte Value Memory Type System memory (RM) 0 Module memory (LP) (class x 10) + pushwheel number where LP class = 3 I/O memory (RS) 1 This byte is required.

3 the first level of the address not using the default value if the module ID byte is encoded. Otherwise, it contains the second level of the address not using the default value.

4 the next level of the address not using the default value.

n up to 7 possible levels of addressing.

Publication 1770-6.5.16 - October 1996

Page 229

13–14

PLC Addressing

Important:

If the value of the mask or a level of the address is greater than or equal to 255, then you cannot encode it into 1 byte. You must flag this case by programming an FF hex at the level address to signify that the level address is greater than or equal to 255 and the next 2 bytes contain the level address. Then code the level into the following two bytes.

The following figures show examples of PLC-5/250 logical binary addresses. PLC-5/250 Logical Binary Address to access the LP address 1N5:300 Byte mask byte: indicates the module ID byte and 5 levels of addressing will be encoded.

1

0 0

1 1

1

1 1

1

2

0 0

0 1

1

1 1

1 module ID byte (LP) = (class x 10) + pushweel (value = 31)

3

0 0

0 0

0

0 1

0 level 1 (value = 2)

4

0 0

0 0

0

0 0

0 level 2 (value = 0)

5

0

0

0 0

0

0 0

1 level 3 (value = 1)

6

0

0

0 0

0

1 0

1 level 4 (value = 5)

7

1

1

1 1

1

1 1

1 level 5 flag (value = FF hex)

8

0

0

1 0

1

1 0

0 (44 - lower byte of word)

9

0

0

0 0

0

0 0

1 (256 - upper byte of word) Byte 8 + Byte 9 = 300

PLC-5 Logical Binary Address to access the RS address I:007 Byte 1

0 0

0 0

0

1 1

1 mask byte; indicates 3 levels in the address

2

0 0

0 0

0

0 0

1 level 1 (value = 1)

3

0 0

0 0

0

0 0

1 level 2 (value = 1)

4

0 0

0 0

0

1 1

1 level 3 (value = 7)

PLC-5/250 Logical Binary Address to access the LP address 2F0:0 Byte

Publication 1770-6.5.16 - October 1996 mask byte; indicates the module ID byte will be encoded and there are 5 levels in the address. Levels 2 and 4 use the default (0). Therefore, only levels 1,3, and 5 will be encoded. Even though level 5 is a 0, it must be encoded, because it is the last level in the address.

1

0 0

1 0

1

0 1

1

2

0 0

1 0

0

0 0

0 module ID byte (LP) = (class x 10) + pushwheel (value = 32)

3

0 0

0 0

0

0 1

0

4

0 0

0 0

0

1 0

0 level 3 (value = 4)

5

0

0 0

0

0 0

1 level 5 (value = 0, the default, but must be encoded because it is the last level)

0 level 1 (value = 2)

Page 230

PLC Addressing

13–15

PLC-5/250 RM/LP Memory (for use with figures on page 13-14) level 1 level 2 1 public stat word 2 data 0 system level 3 level 4 sect file 0 binary 1 integer 2 long integer 3 reserved 4 float 5 timer

6 counter

7 control 8 PID 9 message 10 string level 5 level 6 level 7 element member submember

0 EN 1 TT 2 DN 3 PRE 4 ACC 0 CU 1 CD 2 DN 3 OV 4 UN 5 PRE 6 ACC

Logical ASCII Addressing Logical ASCII addressing is supported by PLC-5/250, PLC-5, and PLC-3 processors. Logical ASCII addressing allows you to specify an address in the same form that you use at the programming node, and lets any device communicate with any other device - without knowing the internal memory structure of the target device. A logical ASCII address starts with an ASCII NULL (0) character and a dollar sign ($) to differentiate it from symbolic addressing. The rest of the address then follows, as a string of ASCII characters. The string is terminated with another NULL character. Logical ASCII address that accesses the 360th element in file 10 Byte

ASCII

HEX

Contents

1

NUL

00

A null character that tells the PLC-5 processor that an ASCII address is to follow.

2

$

24

An ASCII that differentiates a logical ASCII address from a symbolic address.

3

N

4E

4

1

31

5

0

30

6

:

3A

7

3

33

A hex value that corresponds to one character in the PLC-5 ASCII address N10:360. Each byte contains a hex value. For example, byte 3 contains the value for the ASCII character (4 E). Refer to Chapter 15, Codes," for a list of ASCII characters and their hex, binary, and decimal values.

8

6

36

9

0

30

10

NUL

00

A null character that ends the ASCII address specification.

Publication 1770-6.5.16 - October 1996

Page 231

13–16

PLC Addressing

PLC-5 Physical Addressing PLC-5 processors use physical addresses that are related to logical addresses by means of pointers. Since no two PLC-5 systems are configured identically, the pointers are not fixed. Therefore, there is no algorithm for converting logical to physical PLC-5 addresses. A PLC-5 physical address goes in the 4-byte field labelled PLC-5 PHYSICAL ADDR in the PLC-5 physical read or write command message packets. A physical address is made of 24 bits. These bits are inserted in the message packet physical address field as follows (bits are labelled A1 to A24 respectively):

First byte Second byte Third byte Fourth byte

A8 A16 A24 0

A7 A15 A23 0

Function (FNC) Field A6 A5 A4 A14 A13 A12 A22 A21 A20 0 0 0 Size Field

A3 A11 A19 0

A2 A10 A18 0

A1 A9 A17 0

For example, to address a command message to physical word address 12,200 decimal (002FA8 hex), use the following binary code in the address field: First byte Second byte Third byte Fourth byte

1 0 0 0

0 0 0 0

1 1 0 0

0 0 0 0

1 1 0 0

0 1 0 0

0 1 0 0

0 1 0 0

(value A8 hex) (value 2F hex) (values 00 hex) (always 00 hex)

The recommended procedure for uploading or downloading PLC-5 memory is to begin at physical address 0000 and proceed sequentially to the end of memory. Therefore, each successive physical read or write begins at the next physical address after the one where the previous command stopped. Since a single physical read or write command can transfer only about 120 words of data, it takes many commands to upload or download the entire PLC-5 memory.

Publication 1770-6.5.16 - October 1996

Page 232

PLC Addressing

13–17

PLC-5 Floating Point PLC-5 type reads and type writes use the IEEE floating point. (This is the default for PLC-5 processors.) This means data is returned: • low word then high word • low byte then high byte Example: PLC-5 type read 2.0

=

FF

FF

FF low word low

BF high word high low high exponent MSB - mantissa middle MSB - mantissa

1000.00 =

00

00

7A

44

00

00

LSB - mantissa

Example: PLC-5 word range read 1000.00 =

7A

44 low word high word low high low

2.0

=

FF

BF

FF

FF

3.0

=

40

C0

00

00 high

Publication 1770-6.5.16 - October 1996