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

The text of a manual · part 26 of 31

DF1 Protocol and Command Set Reference Manual: 13 - PLC Addressing, pages 216 to 224

Pages 216 to 224 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 216

Chapter

13

PLC Addressing PLC processors support these types of addressing: Type of Addressing logical

Description Type of addressing that a PLC processor uses in its ladder diagram program to access its own data table memory. This is the same type of addressing you use in non-privileged commands (that is, in commands that access only PLC data table memory).

physical

Type of addressing a computer uses to send a privileged command to a PLC node. In particular, you use physical addressing to upload or download PLC memory.

symbolic (PLC-3 only)

Used by a PLC-3 processor to represent a logical (PLC-3 only) address with ASCII characters.

This chapter explains the types of addressing a computer can use in command messages that it transmits to these processors. It contains these sections: Section PLC-2/1774-PLC Addressing

Page 13-2

PLC-3 Addressing

13-4

PLC-5 Addressing

13-9

Publication 1770-6.5.16 - October 1996

Page 217

13–2

PLC Addressing

PLC-2/1774-PLC Addressing

PLC-2 and 1774-PLC processors support logical and physical addressing: For information on

See page

PLC-2/1774-PLC logical addressing

13-2

PLC-2 physical addressing

13-3

1774-PLC physical addressing

13-3

PLC-2/1774-PLC Logical Addressing PLC-2 and 1774-PLC processors access their data tables by using an octal word address. For PLC-2/1774-PLC command messages, you must put the equivalent of this address in the 2-byte message packet field labeled ADDR. To encode a logical PLC-2/1774-PLC address: 1. Convert the octal word address to the number system you are using in your computer application program. 2. Double this converted word address to get the corresponding byte address. 3. Place the result in the ADDR field, low byte first. For example, to address PLC-2 word 020, you must first convert the octal value 20 to the desired base. In this example, we use hexadecimal values. Octal 20 is 10 hex. Doubling this value gives us a value of 20 hex for the byte address. You then code the value 0020 hex in the ADDR field of the message, low byte first. In binary format, ADDR looks like this: First Byte 0

0

Second Byte 1

0

0

0

Low byte (value 20 hex)

Important:

Publication 1770-6.5.16 - October 1996

0

0

0

0

0

0

0

0

0

0

High byte (value 00 hex)

1774-PLC and PLC-2 family controllers use this same logical addressing format when they transmit command messages to another node. If you want to transmit a command message to your computer from one of these PLC processors, set up a buffer space in your computer to simulate PLC-2/1774-PLC memory. You must then write computer application programs to accept and execute commands from these nodes and to translate the ADDR value into the corresponding address in the simulated memory.

Page 218

PLC Addressing

13–3

PLC-2 Physical Addressing PLC-2 processors use physical addresses that are directly related to the logical addresses. To convert a logical address to its corresponding physical address: 1. Move bit 7 of the logical address to bit position 1. 2. Shift bits 1 through 6 to the left one position. The following figure illustrates the conversion process for logical word address 121. Remember that the logical PLC-2 address is a byte address, so the physical address is also a byte address. Converting a PLC-2 Logical Address to a Physical Address PLC-2 word address = 121 octal logical byte address = 242 octal physical byte address = 0046 hex

High byte Bit (octal)

Low byte

17

16

15

14

13

12

11

10

7

6

5

4

3

2

1

0

0

0

0

0

0

0

0

0

1

0

1

0

0

0

1

0

0

0

0

0

0

0

0

0

0

1

0

0

0

1

1

0

Shift bit values 1 through 6 to the left one position.

To send a physical read or physical write to a PLC-2 node, put the PLC-2 physical address in the ADDR field of the command. Be sure to encode the low byte of the physical address as the first byte in the ADDR field.

1774-PLC Physical Addressing The 1774-PLC controllers use physical addresses that are exactly the same values as the corresponding logical addresses. Remember that the logical address is a byte address, so the physical address is also a byte address. For example, the logical byte address of the 17th word in PLC memory is 32 decimal, and the physical address is 32 decimal. To send a physical read or write command to a 1774-PLC node, put the 1774-PLC physical address in the ADDR field of the command message packet. Be sure to encode the low byte of the physical address as the first byte in the ADDR field.

Publication 1770-6.5.16 - October 1996

Page 219

13–4

PLC Addressing

PLC-3 Addressing

PLC-3 family controllers support logical, physical, and symbolic addressing. For information on logical addressing

13-5 physical addressing

13-7 symbolic addressing

13-8

Important:

"

See page

PLC-3 processors can accept and transmit PLC-2/1774-PLC command messages with the PLC-2/1774-PLC logical addressing format. Before sending a PLC-2/1774-PLC command to a PLC-3 node, you must first allocate a PLC-3 input file with the same file number as the PLC-2/1774-PLC’s octal node address on the network. This file helps the PLC-3 to simulate PLC-2/1774-PLC memory. Data is read from or written to this file number.

Transmitting commands from PLC-3 processors To transmit commands from a PLC-3 processor to your computer, set up a computer buffer to simulate a PLC-3 file and write computer application programs that are capable of interpreting all the types of addressing formats that appear in the command messages.

Publication 1770-6.5.16 - October 1996

Page 220

PLC Addressing

13–5

PLC-3 Logical Addressing PLC-3 processors use a form of logical addressing known as extended addressing. With extended addressing, you specify the address for each level (or sub-division) of PLC-3 memory, down to the smallest subdivision you want to access. You can use this method to specify up to 6 levels of extended addressing, which is enough to address any particular word in PLC-3 memory. (For more information on PLC-3 extended addressing, refer to your PLC-3 Family Programming and Operations Manual.) To send a PLC-3 command message to a PLC-3 node, put the extended address of the node in the PLC-3 LOGICAL ADDR field. The first byte in the PLC-3 address field is a flag byte. Flag byte

7

6

5

4

3

2

1

0

0

1

1

1

0

1

1

0 always set to zero associated with levels 1 - 6 of a PLC-3 extended address

If a bit is set to 0: This address level

Has this default value

1

3 (data table)

2

1 (current context)

all others

0

If a bit is set to 1, you must specify a value for the corresponding address level.

Important:

You must specify the last level of a PLC-3 address in the address field even though it is equal to the default value.

If

Then the address values can be specified in one byte each you can code the values directly it takes two bytes to specify an address you must use a delimiter byte of value FF (hex) before each two-byte address. Any two-byte value must be encoded low byte first.

The following example shows how to enter a PLC-3 extended address in logical binary format in the address message packet field.

Publication 1770-6.5.16 - October 1996

Page 221

13–6

PLC Addressing

Example: PLC-3 logical binary addressing format E3

1

8

260

0

0

Data table area = level 1 Context = level 2 Section = level 3 File = level 4 Structure = level 5 Word = level 6

Publication 1770-6.5.16 - October 1996

7 6 8 7

5 4 6 5

3 4

2 1 3 2

0 1 bit level

Byte 1

0 0

1 0

1

1 0

0 flag byte: specifies that the default values are used for levels 1, 2, and 5

Byte 2

0 0

0 0

1

0 0

0 level 3 (value = 8)

Byte 3

1 1

1 1

1

1 1

1 level 4 delimiter: used to signal that the level 4 address uses the next two bytes

Byte 4

0

0

0 0

0

1 0

0 level 4 (low byte)

Byte 5

0 0

0 0

0

0 0

1 level 4 (high byte)

Byte 6

0 0

0 0

0

0 0

0 level 6 (value = 0)

= value 260 (decimal)

Bytes

Description

1

Flag bits 0, 1, and 4 are set to 0 default values are used for levels 1, 2, and 5 of the PLC-3 address. Flag bits 2, 3, and 5 are set to 1 you must specify a value for levels 3, 4, and 6 in the bytes following the flag byte. (Even though the value of address level 6 is 0, the default value, the last level of a PLC-3 address is always specified in the ADDR message packet field.)

2

Address levels are specified lowest level to highest level. Address level 3 is the lowest level that must be specified, so it is specified in the first byte following the flag byte. It is followed by address level 4, then address level 6.

3, 4, and 5

The level-4 address is 260 (decimal), which is too large to fit in one byte. Therefore, byte 3 is a delimiter that contains all 1's (FF hex) and is used to delimit the 2-byte level 4 address value. The value 260 is then coded low byte first in bytes 4 and 5.

6

Specifies the level-6 address.

Page 222

PLC Addressing

13–7

PLC-3 Physical Addressing PLC-3 processors use physical addresses that are related to logical addresses by means of pointers. Since no two PLC-3 systems are configured identically, the pointers are not fixed. Therefore, there is no algorithm for converting logical to physical PLC-3 addresses. A PLC-3 physical address goes in the 4-byte field labeled PLC-3 PHYSICAL ADDR in the PLC-3 physical reads or physical writes. (See Chapter 7, “Communication Commands.”) 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

A24 0 A8 A16

Function (FNC) Field A23 A22 A21 0 0 0 A7 A6 A5 A15 A14 A13 Size Field

A20 0 A4 A12

A19 0 A3 A11

A18 0 A2 A10

A17 0 A1 A9

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

0 0 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

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

The recommended procedure for uploading or downloading PLC-3 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 such commands to upload or download the entire PLC-3 memory.

Publication 1770-6.5.16 - October 1996

Page 223

13–8

PLC Addressing

PLC-3 Symbolic Addressing Symbolic addressing uses ASCII symbols to represent a logical address. Before using a symbolic address in a message, you must first define the symbol at the PLC-3 processor that is to receive the message. (For more information, refer to your PLC-3 user manual.) The symbolic address field can be from 1 to 8 bytes long: • The first byte contains the ASCII code for the first character in the symbol name • The second byte contains the ASCII code for the second character • and so on If the symbol name is more than 8 characters long, encode only the first 8 characters. This module 1775-KA

Accepts ASCII symbols

1775-S5, -SR5

•ASCII symbols •logical ASCII All revision levels of 1775-S5, -SR5 accept PLC-5 type reads and type writes. 1775-S5, -SR5 series A, revision E or later can also use logical ASCII with a PLC-3 word range read or word range write. Example of logical ASCII: 00 $N0:0 00 hex ASCI hex byte byte I

To use a symbolic address in a command message, encode the symbol in the field labelled ASCII symbol in the command message formats. (See Chapter 7, “Communication Commands.”) The message formats show a byte of value zero before and after the symbolic address field. You must include these zero bytes because they act as delimiters to distinguish the symbolic address from other fields in the message Important:

Publication 1770-6.5.16 - October 1996

Only PLC-3 controllers can transmit commands that contain symbolic addresses. If you plan to transmit this type of command message to your computer from a PLC-3 node, you must write computer application programs that are capable of accepting these commands and interpreting the symbolic addresses.

Page 224

PLC Addressing

PLC-5 Addressing

13–9

PLC-5 processors support logical and physical addressing:

"

For information on

See page logical addressing

13-10 physical addressing

13-16 floating point

13-17

Transmitting commands from PLC-5 processors To transmit commands from a PLC-5 processor to your computer, set up a computer buffer to simulate a PLC-5 file and write computer application programs. The programs must be capable of interpreting all the types of addressing formats that appear in the command messages.

Important:

PLC-5 processors can receive and transmit PLC-2/1774-PLC type command messages with the PLC-2/1774-PLC logical addressing format. Before sending a PLC-2/1774-PLC command to a PLC-5 node, you must first allocate a PLC-5 file with a file number that is the decimal equivalent of the PLC-2/1774-PLC’s octal node number. This file helps the PLC-5 to simulate PLC-2/1774-PLC memory. Data is read from or written to this file number.

Publication 1770-6.5.16 - October 1996