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

The text of a manual · part 3 of 70

SLC 500 Instruction Set Reference Manual, pages 21 to 30

Pages 21 to 30 of 694

The original document is the PDF (7.2 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 1747-L514

Page 21

Table of Contents xvii

Appendix D Programming Instruction References

Valid Addressing Modes and File Types. . . . . . . . . . . . . . . . . . . . . . D-1 Understanding the Different Addressing Modes . . . . . . . . . . . . D-2

Appendix E Data File Organization and Addressing

Understanding File Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1 Processor File Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1 Addressing Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-3 Specifying Logical Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-5 Specifying Indexed Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . E-10 Monitoring Indexed Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . E-13 Specifying an Indirect Address . . . . . . . . . . . . . . . . . . . . . . . . . . E-14 Addressing File Instructions - Using the File Indicator (#) . . . E-15 Numeric Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-18 M0 and M1 Data Files - Specialty I/O Modules . . . . . . . . . . . . . . . E-19 Addressing M0-M1 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-20 Restrictions on Using M0 and M1 Data File Addresses . . . . . . E-20 Monitoring Bit Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-20 Transferring Data Between Processor Files and M0 or M1 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-21 Access Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-22 Minimizing the Scan Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-22 Capturing M0-M1 File Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-24 Specialty I/O Modules with Retentive Memory . . . . . . . . . . . . E-24 G Data Files - Specialty I/O Modules . . . . . . . . . . . . . . . . . . . . . . . E-25 Editing G File Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-25

Appendix F Number Systems

Binary Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-1 Positive Decimal Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-1 Negative Decimal Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-2 Hexadecimal Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-3 Hex Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-5 Binary Floating-point Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-6

Appendix G Application Example Programs

Paper Drilling Machine Application Example . . . . . . . . . . . . . . . . . G-1 Paper Drilling Machine Operation Overview. . . . . . . . . . . . . . . . . . G-3 Drill Mechanism Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-5 Conveyor Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-6 Drill Calculation and Warning. . . . . . . . . . . . . . . . . . . . . . . . . . G-10 Time Driven Sequencer Application Example . . . . . . . . . . . . . . . . G-14 Time Driven Sequencer Ladder Program . . . . . . . . . . . . . . . . . . . . G-14 Event Driven Sequencer Application Example . . . . . . . . . . . . . . . G-15 Event Driven Sequencer Ladder Program . . . . . . . . . . . . . . . . . . . G-15 Publication 1747-RM001G-EN-P - November 2008

Page 22

xviii

Table of Contents

On/Off Circuit Application Example. . . . . . . . . . . . . . . . . . . . . . . G-16 On/Off Circuit Ladder Program. . . . . . . . . . . . . . . . . . . . . . . . . . . G-17 Interfacing with Enhanced Bar Code Decoders Over DH-485 Network Using the MSG Instruction . . . . . . . . . . . . . . . . . . . . . . . G-17 Processor and Decoder Operation . . . . . . . . . . . . . . . . . . . . . . G-17 System Set Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-18 Operating Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-19 Sequence of Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-20 Optimizing MSG Time-out. . . . . . . . . . . . . . . . . . . . . . . . . . . . G-21 Example MSG Instruction Configuration . . . . . . . . . . . . . . . . G-21 Example Scanner and Decoder Configuration. . . . . . . . . . . . . G-22 Example Ladder Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-23

Appendix H Supported Read/Write Commands Supported Read/Write Commands. . . . . . . . . . . . . . . . . . . . . . . . . . H-1 Index SLC 500 Alphabetical List of Instructions . . . . . . . . . . . . . . . . . 1-11 Rockwell Automation Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 Installation Assistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 New Product Satisfaction Return . . . . . . . . . . . . . . . . . . . . . . . . 1-12

Publication 1747-RM001G-EN-P - November 2008

Page 23

Preface

Read this preface to familiarize yourself with the rest of the manual. It provides information concerning: • who should use this manual. • the purpose of this manual. • related documentation. • common techniques used in this manual

Who Should Use This Manual

Use this manual if you are responsible for designing, installing, programming, or troubleshooting control systems that use SLC 500 programmable controllers. You should have a basic understanding of electrical circuitry and familiarity with relay logic. If you do not, obtain the proper training before using this product.

Purpose of This Manual

This manual is a reference guide for SLC 500 controllers. This manual: • provides status file functions. • provides the instructions used in your ladder logic programs. • compliments the online help available at the terminal.

1

Publication 1747-RM001G-EN-P - November 2008

Page 24

2

Preface

Related Documentation The following documents contain additional information concerning Rockwell Automation products. To obtain a copy, contact your local Rockwell Automation office or distributor.

For

Read This Document

Document Number

An overview of the SLC 500 family of products.

SLC 500 System Overview

1747-SO001

A description on how to install and use your Modular SLC 500 programmable controller.

Installation & Operation Manual for Modular Hardware Style Programmable Controllers

1747-UM011

A description on how to install and use your Fixed SLC 500 programmable controller.

Installation & Operation Manual for Fixed Hardware Style Programmable Controllers

1747-6.21

In-depth information on grounding and wiring Allen-Bradley programmable controllers.

Allen-Bradley Programmable Controller Grounding and Wiring Guidelines

1770-4.1

A description of important differences between solid-state Application Considerations for Solid-State programmable controller products and hard-wired electromechanical Controls devices.

SGI-1.1

An article on wire sizes and types for grounding electrical equipment.

National Electrical Code - Published by the National Fire Protection Association of Boston, MA.

A glossary of industrial automation terms and abbreviations.

Allen-Bradley Industrial Automation Glossary

AG-7.1

If you would like a manual, you can: • download a free electronic version from the Internet at www.literature.rockwellautomation.com • purchase a printed manual by contacting your local distributor or Rockwell Automation representative

Common Techniques Used in This Manual

Publication 1747-RM001G-EN-P - November 2008

The following conventions are used throughout this manual. • Bulleted lists such as this one provide information, not procedural steps • Numbered lists provide sequential steps or hierarchical information • Italic type is used for emphasis

Page 25

Chapter

1

Processor Files

File Structure

SLC 500 user memory is comprised of Data Files and Program Files.

TIP

The file types shown below for data files 3 through 8 are the default values. Files 9 to 255 can be configured to be bit, timer, counter, control, integer, floating point, ASCII, or String files.

0 2 3

Input File Status File Bit File Timer File Counter File 4

5 6

Data Files

Floating Point File

Control File

7 Integer File

Output File

1

8 9 to 255 B Bit T Timer C Counter R Control N Integer F Floating Pt.(1) ST String(1) A ASCII(1)

Program Files

0 2 3 to 255

Program File 2 Program Files 3 to 255

System File 1

System File 0

1

(1) SLC 5/03 and higher processors only.

1

Publication 1747-RM001G-EN-P - November 2008

Page 26

1-2

Processor Files

Output and Input Data Files (Files O0: and I1:) Data Files 0 and 1 represent external outputs and inputs, respectively. Bits in file 1 are used to represent external inputs. In most cases, a single 16-bit word in these files will correspond to a slot location in your controller, with bit numbers corresponding to input or output terminal numbers. Unused bits of the word are not available for use. Table 1.1 explains the addressing format for outputs and inputs. Note that the format specifies e as the slot number and s as the word number. When referencing output and input data file words, refer to the element as e.s (slot and word), taken together.

Table 1.1 Output and Input Data File Addressing Formats Format

Explanation

O:e.s/b

O

Output

I:e.s/b

I

Input

:

Element delimiter e

Slot number (decimal)

Slot 0, adjacent to the power supply in the first chassis, applies to the processor module (CPU). Succeeding slots are I/O slots, numbered from 1 to a maximum of 30.

.

Word delimiter.

Required only if a word number is necessary as noted below.

s

Word number

Required if the number of inputs or outputs exceeds 16 for the slot. Range: 0-255 (range accommodates multi-word “specialty cards”)

/

Bit delimiter b

Terminal number

Inputs: 0-15 Outputs: 0-15

Examples: O:3/15 O:5/0 O:10/11 I:7/8 I:2.1/3

Output 15, slot3 Output 0, slot 5 Output 11, slot 10 Input 8, slot 7 Input 3, slot 2, word 1

O:5 O:5.1 I:8

Output word 0, slot 5 Output word 1, slot 5 Input word 0, slot 8

Default Values: Your programming device will display an address more formally. For example, when you assign the address O:5/0, the programming device will show it as O:5.0/0 (Output file, slot 5, word 0, terminal 0).

Publication 1747-RM001G-EN-P - November 2008

Page 27

Processor Files

1-3

Status File (File S2:) You cannot add to or delete from the status file. See Table 1.2 to understand how to address various bits and words within the status file. You can address various bits and words as follows.

Table 1.2 Status File Addressing Format Format

Explanation

S:e/b

S

Status file

:

Element delimiter e

Element number

/

Bit delimiter b

Bit number

Ranges from 0 to 15 in a fixed or SLC 5/01 controller, 0 to 32 in an SLC 5/02, 0 to 82 in an SLC 5/03 and 0 to 82 in an SLC 5/05, 0 to 96 in an SLC 5/04 OS400, and 0 to 163 in an SLC 5/04 OS401 processors. These are 1-word elements. 16 bits per element. Bit location within the element. Ranges from 0 to 15.

Examples: S:1/15

Element 1, bit 15. This is the “first pass” bit, which you can use to initialize instructions in your program.

S:3

Element 3. The lower byte of this element is the current scan time. The upper byte is the watchdog scan time.

Bit Data File (B3:) File 3 is the bit file, used primarily for bit (relay logic) instructions, shift registers, and sequencers. The maximum size of the file is 256 1-word elements, a total of 4096 bits. You can address bits by specifying the element number (0 to 255) and the bit number (0 to 15) within the element. You can also address bits by numbering them in sequence, 0 to 4095. You can also address elements of this file. See Table 1.3 for a detailed format description. Note the two different possible formats that can be used.

Publication 1747-RM001G-EN-P - November 2008

Page 28

1-4

Processor Files

Table 1.3 Bit File Addressing Format Format

Explanation

Bf:e/b

B

Bit type file f

File number. Number 3 is the default file. A file number between 9-255 can be used if additional storage is required.

:

Element delimiter e

Element number

/

Bit delimiter b

Bit number

B f /

Same as above. Same as above. Same as above.

b

Bit number

Bf/b

Ranges from 0-255. These are 1-word elements. 16 bits per element. Bit location within the element. Ranges from 0-15.

Numerical position of the bit within the file. Ranges from 0-4095.

Examples: B3:3/14

Bit 14, element 3

B3:252/00

Bit 0, element 252

B3:9

Bit 62

B3/62

Bit 62

B3/4032

Bit 4032

Timer Data File (T4:) TIP

Timing could be inaccurate if Jump (JMP), Label (LBL), Jump to Subroutine (JSR), or Subroutine (SBR) instructions skip over the rung containing a timer instruction while the timer is timing. If the skip duration is less than 2.5 seconds, no time will be lost; if the skip duration exceeds 2.5 seconds, an undetectable timing error occurs. When using subroutines, a timer must be executed at least every 2.5 seconds to prevent a timing error.

Timer instructions use various control bits. These are 3-word elements, used with Bit, TON, TOF and RTO instructions. Word 0 is the status word, word 1 indicates the preset value, and word 2 indicates accumulator value. This is shown in Table 1.4.

Publication 1747-RM001G-EN-P - November 2008

Page 29

Processor Files

1-5

Table 1.4 Timer Control Fields 15

14

13

EN

TT

DN

12

11

10

9

8

7

6

5

4

3

2

1

0

Word 0

Internal Use(1)

Preset Value (PRE)

1

Accumulator Value (ACC)

2

(1)

Bits labeled “Internal Use” are not addressable.

Table 1.5 Timer Elements Addressable Bits

Addressable Words

EN = Enable (Bit 15)

PRE = Preset Value

TT = Timer Timing (Bit 14)

ACC = Accumulated Value

DN = Done (Bit 13)

Addressing Structure Address bits and words using the format Tf:e.s/b. Table 1.6 Timer Addressing Format Explanation T

Timer file f

File number. For SLC 500 processors the default is 4. A file number between 9 to 255 can be used for additional storage.

:

Element delimiter e

Element number

These are 3-word elements. The range is 0 to 255.

.

Word Delimiter

Range 0 to 2 s

Word Number

/

Bit delimiter b

Bit Number

Range 0 to 15

Examples T4:0/15 or T4:0/EN

Enable bit

T4:0/14 or T4:0/TT

Timer timing bit

T4:0/13 or T4:0/DN

Done bit

T4:0.1 or T4:0.PRE

Preset value of the timer

T4:0.2 or T4:0.ACC

Accumulated value of the timer

T4:0.1/0 or T4:0.PRE/0

Bit 0 of the preset value

T4:0.2/0 or T4:0.ACC/0

Bit 0 of the accumulated value

Publication 1747-RM001G-EN-P - November 2008

Page 30

1-6

Processor Files

Counter Data File Elements (C5:) Each Counter address is made of a 3-word data file element. Word 0 is the control word, containing the status bits of the instruction. Word 1 is the preset value. Word 2 is the accumulated value. The control word for counter instructions includes five status bits, as indicated below.

Table 1.7 Counter Control Fields 15

14

13

12

11

10

CU

CD

DN

OV

UN

UA(1)

09

08

07

06

05

04

03

02

01

00

Word 0

Internal Use(2)

Preset Value (PRE)

1

Accumulator Value (ACC)

2

(1)

Fixed SLC 500 only.

(2)

Bits labeled “Internal Use” are not addressable.

Table 1.8 Counter Elements Addressable Bits

Addressable Words

CU = Count up enable (Bit 15)

PRE = Preset

CD = Count down enable (Bit 14)

ACC = Accum

DN = Done bit (Bit 13) OV = Overflow bit (Bit 12) UN = Underflow bit (Bit 11) UA = Update Accumulator bit (Bit 10) (Fixed Controller Only)

Publication 1747-RM001G-EN-P - November 2008