The text of a manual ยท part 1 of 70
SLC 500 Instruction Set Reference Manual, pages 1 to 10
Pages 1 to 10 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 1
SLC 500 Instruction Set Catalog Numbers 1747-L20x, 1747-L30x, 1747-L40x, 1747-L511, 1747-L514, 1747-L524, 1747-L531, 1747-L532, 1747-L533, 1747-L541, 1747-L542, 1747-L543, 1747-L551, 1747-L552, 1747-L553
Reference Manual
Page 2
Important User Information
Solid state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls, publication SGI-1.1, available from your local Rockwell Automation sales office or online at http://www.literature.rockwellautomation.com), describes some important differences between solid state equipment and hard-wired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid state equipment, all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable. In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment. The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the examples and diagrams. No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this manual. Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited. Throughout this manual, when necessary, we use notes to make you aware of safety considerations. WARNING
IMPORTANT
ATTENTION
Publication 1747-RM001G-EN-P - November 2008
Identifies information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to personal injury or death, property damage, or economic loss.
Identifies information that is critical for successful application and understanding of the product. Identifies information about practices or circumstances that can lead to personal injury or death, property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and recognize the consequences.
SHOCK HAZARD
Labels may be located on or inside the equipment (for example, drive or motor) to alert people that dangerous voltage may be present.
BURN HAZARD
Labels may be located on or inside the equipment (for example, drive or motor) to alert people that surfaces may be dangerous temperatures.
Page 3
Summary of Changes
The information below summarizes the changes to this manual since the last printing. To help you find new and updated information in this release of the manual, we have included change bars as shown next to this paragraph. The table below lists the sections that document new features and additional or updated information about existing features.
1
For This Information
See Page
Addition of a powerup error to Table 16.1.
16-4
Revision of the company name from "Allen-Bradley" to "Rockwell Automation".
G-1
Publication 1747-RM001G-EN-P - November 2008
Page 4
2
Summary of Changes
Notes:
Publication 1747-RM001G-EN-P - November 2008
Page 5
Table of Contents Preface
Who Should Use This Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-1 Purpose of This Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-1 Related Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-2 Common Techniques Used in This Manual . . . . . . . . . . . . . . . . . . . . P-2
Chapter 1 Processor Files
File Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Output and Input Data Files (Files O0: and I1:) . . . . . . . . . . . . . 1-2 Status File (File S2:) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Bit Data File (B3:) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Timer Data File (T4:). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Addressing Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 Counter Data File Elements (C5:). . . . . . . . . . . . . . . . . . . . . . . . . 1-6 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 Addressing Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 Control Data File (R6:) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Integer Data File (N7:) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 Float Data File (F8:). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11
Chapter 2 Basic Instructions i
About the Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Bit Instructions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Examine if Closed (XIC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Examine if Open (XIO). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Output Energize (OTE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Output Latch (OTL) and Output Unlatch (OTU) . . . . . . . . . . . . . . . 2-4 Using OTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Using OTU. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 One-shot Rising (OSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Timer Instructions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Timer On-delay (TON) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Using Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Timer Off-delay (TOF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Using Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Retentive Timer (RTO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Using Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 Counter Instructions Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13 How Counters Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13 Count Up (CTU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13 Using Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 Count Down (CTD). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 Using Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15 High-speed Counter (HSC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15 High-speed Counter Data Elements. . . . . . . . . . . . . . . . . . . . . . 2-16 Publication 1747-RM001G-EN-P - November 2008
Page 6
ii
Table of Contents
High-speed Counter Operation . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 Reset (RES). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Chapter 3 Comparison Instructions
About the Comparison Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 Comparison Instructions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Using Indexed Word Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Using Indirect Word Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Equal (EQU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Not Equal (NEQ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Less Than (LES). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Less Than or Equal (LEQ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Greater Than (GRT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Greater Than or Equal (GEQ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Masked Comparison for Equal (MEQ). . . . . . . . . . . . . . . . . . . . . . . . 3-4 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Limit Test (LIM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Chapter 4 Math Instructions
Publication 1747-RM001G-EN-P - November 2008
About the Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Math Instructions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Using Indexed Word Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Using Indirect Word Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Overflow Trap Bit, S:5/0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Updates to the Math Register, S:13 and S:14 . . . . . . . . . . . . . . . . 4-3 Using Floating Point Data File (F8:). . . . . . . . . . . . . . . . . . . . . . . 4-4 Add (ADD). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . 4-5 Subtract (SUB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . 4-5 32-Bit Addition and Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6 Math Overflow Selection Bit S:2/14. . . . . . . . . . . . . . . . . . . . . . . 4-6 Multiply (MUL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Updates to the Math Register, S:13 and S:14 . . . . . . . . . . . . . . . . 4-9 Divide (DIV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . 4-9 Updates to the Math Registers, S:13 and S:14 . . . . . . . . . . . . . . 4-10 Double Divide (DDV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-11 Updates to the Math Registers, S:13 and S:14 . . . . . . . . . . . . . . 4-11 Clear (CLR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
Page 7
Table of Contents iii
Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-12 Square Root (SQR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-12 Scale with Parameters (SCP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-14 Application Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14 Scale Data (SCL). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-16 Application Example 1 - Converting 4 to 20 mA Analog Input Signal to PID Process Variable . . . . . . . . . . . . . . . . . . . . . 4-17 Application Example 2 - Scaling an Analog Input to Control an Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18 Ramp Instruction (RMP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20 Instruction Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22 RMP Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23 Continuous Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23 Absolute (ABS). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-24 Compute (CPT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-26 Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26 Swap (SWP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28 Arc Sine (ASN). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-29 Arc Cosine (ACS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-29 Arc Tangent (ATN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-30 Cosine (COS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-30 Natural Log (LN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-31 Log to the Base 10 (LOG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-31 Sine (SIN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-32 Tangent (TAN). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-32 X to the Power of Y (XPY) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 4-33
Publication 1747-RM001G-EN-P - November 2008
Page 8
iv
Table of Contents
Chapter 5 Data Handling Instructions
Publication 1747-RM001G-EN-P - November 2008
Convert to BCD (TOD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Updates to the Math Register, S:13 and S:14 . . . . . . . . . . . . . . . . 5-3 Convert from BCD (FRD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . 5-5 Changes to the Math Register, S:13 and S:14 . . . . . . . . . . . . . . . . 5-6 Radian to Degrees (DEG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Degrees to Radians (RAD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-10 Decode 4 to 1 of 16 (DCD). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11 Encode 1 of 16 to 4 (ENC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-12 Copy File (COP) and Fill File (FLL) Instructions . . . . . . . . . . . . . . 5-13 Using COP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13 Using FLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 Move and Logical Instructions Overview. . . . . . . . . . . . . . . . . . . . . 5-16 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Using Indexed Word Addresses . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-16 Using Indirect Word Addresses . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Updates to the Math Register, S:13 and S:14 . . . . . . . . . . . . . . . 5-17 Entering Mask Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17 Move (MOV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-17 Masked Move (MVM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-18 And (AND) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-20 Or (OR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-21 Exclusive Or (XOR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-22 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-22 Not (NOT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-23 Negate (NEG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-24 Updates to Arithmetic Status Bits. . . . . . . . . . . . . . . . . . . . . . . . 5-24 FIFO and LIFO Instructions Overview . . . . . . . . . . . . . . . . . . . . . . 5-25 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25
Page 9
Table of Contents v
Effects on Index Register S:24 . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26 FIFO Load (FFL) and FIFO Unload (FFU) . . . . . . . . . . . . . . . . . . 5-26 FFL Instruction Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27 FFU Instruction Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27 LIFO Load (LFL) and LIFO Unload (LFU) . . . . . . . . . . . . . . . . . . 5-28 LFL Instruction Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29 LFU Instruction Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
Chapter 6 Program Flow Instructions
About the Program Flow Control Instructions . . . . . . . . . . . . . . . . . 6-1 Jump to Label (JMP) and Label (LBL) . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Using JMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Using LBL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 Jump to Subroutine (JSR), Subroutine (SBR), and Return (RET) . . . 6-3 Nesting Subroutine Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4 Using JSR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4 Using SBR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 Using RET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 Master Control Reset (MCR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6 Processor Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6 Temporary End (TND) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7 Suspend (SUS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Immediate Input with Mask (IIM) . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Immediate Output with Mask (IOM) . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 I/O Refresh (REF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10 Using an SLC 5/02 Processor. . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10 Using SLC 5/03 and Higher Processors. . . . . . . . . . . . . . . . . . . 6-10
Chapter 7 Application Specific Instructions
About the Application Specific Instructions. . . . . . . . . . . . . . . . . . . . 7-2 Bit Shift Instructions Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Effects on Index Register S:24 . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4 Bit Shift Left (BSL) Bit Shift Right (BSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4 Use BSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4 Use BSR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 Sequencer Instructions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 Effects on Index Register S:24 . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 Applications Requiring More than 16 Bits . . . . . . . . . . . . . . . . . . 7-6
Publication 1747-RM001G-EN-P - November 2008
Page 10
vi
Table of Contents
Sequencer Output (SQO) Sequencer Compare (SQC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6 Enter Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6 Use SQO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8 Use SQC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10 Sequencer Load (SQL). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12 Enter Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14 Read High-speed Clock and Compute Time Difference Overview 7-15 RHC Instruction Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-15 TDF Instruction Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16 Read High-speed Clock Instruction (RHC) . . . . . . . . . . . . . . . . . . . 7-17 Enter Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17 Compute Time Difference Instruction (TDF) . . . . . . . . . . . . . . . . . 7-17 Enter Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17 File Bit Comparison (FBC) and Diagnostic Detect (DDT) . . . . . . . 7-18 Select the Search Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18 Enter Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20 Use Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-21 Read Program Checksum (RPC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23 Enter Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23
Chapter 8 Block Transfer Instructions
Block Transfer Instructions (BTR and BTW) . . . . . . . . . . . . . . . . . . 8-1 RIO Block Transfer General Functional Overview. . . . . . . . . . . 8-2 Entering Parameters for BTR and BTW . . . . . . . . . . . . . . . . . . . 8-2 Control Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3 Instruction Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 Programming Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Comparison to the PLC-5 BTR and BTW . . . . . . . . . . . . . . . . . 8-11
Chapter 9 Proportional Integral Derivative Instruction
Publication 1747-RM001G-EN-P - November 2008
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 The PID Concept. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 The PID Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 The PID Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 Entering Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 PID Control Block Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Controller Gain (Kc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Reset Term (Ti) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Rate Term (Td) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Feed Forward/Bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Mode (TM). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Loop Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8 Deadband . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8