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

The text of a manual · part 8 of 45

Enhanced and Ethernet PLC-5 Programmable Controllers User Manual: Chapter 4 - Addressing I/O and Controller Memory, pages 53 to 60

Pages 53 to 60 of 388, from Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

The original document is the PDF (5.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.

For the Allen-Bradley 1785-L20B and Allen-Bradley 1785-L40B

Page 53

Addressing I/O and Controller Memory

4-9

When assigning remote I/O rack numbers, use these guidelines:

TIP

• A single remote I/O scanner channel can support up to 32 devices but only 16 rack numbers. For more information, see chapter 6. • Limit the number of remote I/O rack numbers to those that your PLC-5 controller can support. • The PLC-5 controller and the 1771-ASB adapter module automatically allocate the next higher rack number(s) to the remaining I/O groups of the chassis. For example, if you select 1/2-slot addressing for your controller-resident local chassis and you are using a 16-slot (1771-A4B) chassis, the controller will address racks 0, 1, 2, and 3 in this chassis. • You can assign a remote I/O rack to a fraction of a chassis, a single I/O chassis, or multiple I/O chassis as shown below.

I/O Rack No. 0

I/O Rack No. 1

01 23 45 67 01 23 45 67

0

1

2

3

4 5

6

7

One 16-slot chassis, two racks

One 16-slot chassis, one rack I/O Rack No. 3

0

1

2

3

One 8-slot chassis, 1/2 rack

4

5

Two 4-slot chassis, 1/4 rack each

6

7

16466

Publication 1785-UM012D-EN-P - July 2005

Page 54

4-10

Addressing I/O and Controller Memory

Understanding PLC-5 Controller Memory

Controller memory is divided into two basic areas:

Storage Areas

Description

Data

All of the data the controller examines or changes is stored in files in data storage areas of memory. These storage areas store: • Data received from input modules • Data to be sent to output modules; this data represents decisions made by the logic • Intermediate results made by the logic • Preloaded data such as presets and recipes • Control instructions • System status You create files for program logic, depending on the method you are using: ladder logic, sequential function charts, and/or structured text. These files contain the instructions to examine inputs and outputs and return results.

Program Files

Publication 1785-UM012D-EN-P - July 2005

Page 55

Addressing I/O and Controller Memory

4-11

Understanding Data Storage (Data-Table Files) The controller divides data storage into: Integer Data Table Files

File # Integer File 7

• Types that let you specify different formats and ranges to accommodate different types of data. For more information on the different types of data files, see on page 13.

File 999

Words (Sample Data)

Integer Files

• You can create multiple files of a given type. Files let you group and organize logically related data. When you need to access data, you specify the file in which the data is stored.

1020 File 7

64 7779 2

Integer File

Natural binary bit pattern for 276 (decimal format)

276

0 0 0 0 0 0 01 0 0 0 1 0 1 0 0

• Some types of files are made up of 16-bit words. Floating-point words are 32 bits. When you need to access this data, you specify it with a formatted address.

• Each word contains multiple bits. This is the smallest division of data. A bit contains a value of zero or one. When you need to access this data, you specify it with a formatted address.

Timer File # structure members 2760 preset .PRE accumulated .ACC 432

Timer #

.EN .TT .DN

File # Starting addr (Length)

recipe "A" data

Starting addr (Length)

recipe "B" data

Starting addr (Length)

production counts up to 1000 words

• Some types of files are divided into structures used to control instruction elements. These structures are subdivided into members at the bit or word level. When you need to access this data, you specify it with a formatted address.

You can also organize data within files into data blocks to group and organize logically related data. When you need to access this data, you specify only the starting address within the file (and length) instead of each individual address. When you organize data, group data by similar kind, such as: • results of calculations • batch recipes Because of the structure of block-transfer instructions, you must group data such as: • inputs from analog modules • outputs to analog modules

Publication 1785-UM012D-EN-P - July 2005

Page 56

4-12

Addressing I/O and Controller Memory

TIP

You might also want to leave room for future expansion when grouping data. Do this by leaving gaps between: • data blocks within a file • groups of sequentially numbered files • modules in an I/O chassis

IMPORTANT

TIP

If you plan to edit your program online in Run mode, you must allocate unused data table files/elements and program files because you cannot create user memory while in run mode. Each unused file, however, uses 6 words of overhead memory for each data/program file you skip. Use care when leaving gaps.

Follow these guidelines when organizing data files: • Group large amounts of related data into files. • Address the data files from 3-999 as needed. (See on page page 13). • Address the words needed in each data file consecutively from 0-999 (0-1999 for some data types in series E, revision D controllers and later). • Address the words of I/O image data according to how you configured your I/O: – 0-37 (octal) for PLC-5/11, -5/20, -5/20E – 0-77 (octal) for PLC-5/30 – 0-177 (octal) for PLC-5/40, -5/40L, -5/40E – 0-277 (octal) for PLC-5/60, -5/60L, -5/80, -5/80E • When addressing I/O image bits, address them 00-07 or 10-17 (octal). • When organizing bit data, address the bits in each word 0-15 (decimal) for binary or integer files. Each data table file allocates 6 words of memory when you create the file. This is in addition to any data stored in the file.

Publication 1785-UM012D-EN-P - July 2005

Page 57

Addressing I/O and Controller Memory

4-13

Addressing File Types The following two tables show the available file types and the amount of memory used by each. Data Table File Types and Memory Usage for PLC-5 Controllers Series E/Revision D and Later File Type

File-Type File Maximum Size of File Identifier Number 16-bit Words and Structures PLC-5/11, -5/20, -5/20E

PLC-5/30 PLC-5/40, -5/40E, -5/40L

PLC-5/60, -5/60L, -5/80, -5/80E

Memory Used in Memory Used Overhead for Each (in 16-bit Words) File per Word, (in 16-bit Words) Character, or Structure

Output image O

0

32

64

128

192

6

1/word

Input image

I

1

32

64

128

192

6

1/word

Status

S

2

128

128

128

128

6

1/word

Bit (binary)

B

31

2000 words

6

1/word

Timer

T

41

6000 words/2000 structures

6

3/structure

Counter

C

51

6000 words/2000 structures

6

3/structure

Control

R

61

6000 words/2000 structures

6

3/structure

Integer

N

71

2000 words

6

1/word

Floating-point F

81

4000 words/2000 structures

6

2/structure

ASCII

A

3-999

2000 words

6

1/2 per character

BCD

D

3-999

2000words

6

1/word

Block-transfer BT

3-999

12000 words/2000 structures

6

6/structure

Message

MG

3-999

32760 words/585 structures2

6

56/structure

PID

PD

3-999

32718 words/399 structures2

6

82/structure

SFC status

SC

3-999

6000 words/2000 structures

6

3/structure

ASCII string

ST

3-999

32760 words/780 structures2

6

42/structure

Unused

--

9-999

6

6

0

1 2

This is the default file number and type. For this file type, you can assign any file number from 3 through 999. The maximum size of a data table file is 32K words. The maximum size of the entire data table is 64K words

Publication 1785-UM012D-EN-P - July 2005

Page 58

4-14

Addressing I/O and Controller Memory

Data Table File Types and Memory Usage for PLC-5 Controllers Series E/Revision C and Earlier File Type

File-Type File Maximum Size of File Identifier Number 16-bit Words and Structures PLC-5/11, -5/20, -5/20E

PLC-5/30 PLC-5/40, -5/40E, -5/40L

PLC-5/60, -5/60L, -5/80, -5/80E

Memory Used in Memory Used Overhead for Each (in 16-bit Words) File per Word, (in 16-bit Words) Character, or Structure

Output image O

0

32

64

128

192

6

1/word

Input image

I

1

32

64

128

192

6

1/word

Status

S

2

128

128

128

128

6

1/word

Bit (binary)

B

31

1000 words

6

1/word

Timer

T

41

3000 words/1000 structures

6

3/structure

Counter

C

51

3000 words/1000 structures

6

3/structure

Control

R

61

3000 words/1000 structures

6

3/structure

Integer

N

71

1000 words

6

1/word

Floating-point F

81

2000 words/1000 structures

6

2/structure

ASCII

A

3-999

1000 words

6

1/2 per character

BCD

D

3-999

1000words

6

1/word

Block-transfer BT

3-999

6000 words/1000 structures

6

6/structure

Message

MG

3-999

32760 words/585 structures2

6

56/structure

PID

PD

3-999

32718 words/399 structures2

6

82/structure

SFC status

SC

3-999

3000 words/1000 structures

6

3/structure

ASCII string

ST

3-999

32760 words/780 structures2

6

42/structure

Unused

--

9-999

6

6

0

1 2

This is the default file number and type. For this file type, you can assign any file number from 3 through 999. The maximum size of a data table file is 32K words. The maximum size of the entire data table is 64K words

Publication 1785-UM012D-EN-P - July 2005

Page 59

Addressing I/O and Controller Memory

4-15

Valid Data Types/Values Are: This Data Type/Value Accepts Any Immediate Value between -32768 and 32767 (Constants greater than 1024 use 2 storage words of memory; floating point (program constant) constants use 3 words of memory.) Integer Integer data type: integer, timer, counter, status, bit, input, output, ASCII, BCD, control (e.g., N7:0, C4:0, etc.) Float Floating point data type (valid range is + 1.175494e-38 to +3.402823e+38) with 7-digit precision Block Message PID String SFC status

Block-transfer data type (e.g., BT14:0) or integer data type (e.g., N7:0) Message data type (e.g., MG15:0) or integer data type (e.g., N7:0) PID data type (e.g., PD16:0) or integer data type (e.g., N7:0) String data type (e.g., ST12:0) SFC status data type (e.g., SC17:0)

Understanding Program-File Storage Create program files based on the programming method you are using. This table lists the number of words used by each type of program file: Program File Ladder SFC Structured Text

Number of Words Used 6/file + 1/word 6/file 6/file + 1/word

The more program files that you create, the longer the controller takes to perform certain tasks, e.g., going to run mode, performing online editing, saving a program. Also, certain instructions (JMP, LBL, FOR, and NXT) have longer execution times in higher program file numbers. Series E PLC-5 controllers support 2000 program files to allow for more SFC steps in your program. SFC step/transition program files are typically shorter in length. This enhancement will effectively double your SFC step/transition size. Each program file you create is allocated 6 words of memory. This memory is in addition to any programming within the file. If you create the maximum program file number 1999, this allocates 12,000 words of memory to the program files, which reduces the amount of controller memory left for programming.

Publication 1785-UM012D-EN-P - July 2005

Page 60

4-16

Addressing I/O and Controller Memory

Valid formats for addressing data files are:

Addressing

If You Want to Access Input or output bit in the I/O image table Bit, word, sub-member, data block, file, or I/O image bit A component within a logical address by substituting the value in another address An address offset by some number of elements A substitute name for an address

Use this Addressing Format I/O image address Logical address Indirect address

And See Page 4-16 4-17 4-18

Indexed address Symbolic address

4-20 4-21

For more information about entering addresses, see the documentation for your programming software.

Specifying I/O Image Addresses The I/O image address corresponds to the physical location of the I/O circuit in the I/O chassis: a

I/O address identifierI = input device O = output device bb

I/O Rack numberPLC-5/11, -5/20, -5/20E00-03 (octal) PLC-5/3000-07 (octal) PLC-5/40, -5/40L, -5/40E00-17 (octal) PLC-5/60, -5/60L, -5/80, -5/80E00-27 (octal)

c

I/O Group number0-7 (octal)

dd

Terminal (bit) number00-17 (octal)

To Specify this Address Input Image Bit

Example I

:

0

1

7

/

0

1

I for input 2-digit I/O rack Number I/O group number (0-7) Input number (0-7, 10-17)

Output Image Bit

O : 0 1 7 / 0 1

O for output 2-digit I/O rack Number I/O group number (0-7) Output number (0-7, 10-17)

Publication 1785-UM012D-EN-P - July 2005