Allen-Bradley Mini-PLC Mini-PLC-2/16 User manual

MiniPLC2/02, 2/16, 2/17 Processor
(cat. no. 1772LZ, LZP, LX, LXP,
LW, LWP)
User Manual

Because of the variety of uses for this product and because of the differences
between solid state products and electromechanical products, those responsible
for applying and using this product must satisfy themselves as to the
acceptability of each application and use of this product. For more information,
refer to publication SGI-1.1 (Safety Guidelines For The Application, Installation
and Maintenance of Solid State Control).
The illustrations, charts, and layout examples shown in this manual are intended
solely to illustrate the text of this manual. Because of the many variables and
requirements associated with any particular installation, Allen-Bradley Company
cannot assume responsibility or liability for actual use based upon the illustrative
uses and applications.
No patent liability is assumed by Allen-Bradley Company with respect to use of
information, circuits, equipment or software described in this text.
Reproduction of the contents of this manual, in whole or in part, without written
permission of the Allen-Bradley Company is prohibited.
Throughout this manual we make notes to alert you to possible injury to people
or damage to equipment under specific circumstances.
ATTENTION: Identifies information about practices or
circumstances that can lead to personal injury or death, property
damage or economic loss.
Attention helps you:
- Identify a hazard
- Avoid the hazard
- recognize the consequences
Important: Identifies information that is critical for successful application and
understanding of the product.
Important User Information

Summary of Changes
i
Summary of Changes
This release of the publication contains updated information:
For this updated information: See:
revised conventions chapter 1
clarified ATTENTION statement about using
1770XZ batteries
chapter 3
revised illustrations showing the new chassis
(1771A1B, A2B, A3B, A3B1, and A4B)
chapter 3
chapter 4
chapter 5
chapter 10
minor corrections to the structure for
2slot addressing
chapter 7
appendix E
added information about adding Branch Start and
Branch End instructions while programming
on line
chapter 9
corrected last counter address information for
counter instructions
chapter 11
minor corrections to Limit Test examples chapter 12
added more information about output alarms and
output limits
chapter 16
minor correction to FIFO ladder diagram examples chapter 15
appendix E
added warning about using Jump instructions;
corrections to programming examples
chapter 17
corrections to programming examples chapter 18
added warning about using selectable timed
interrupt routines
chapter 22
minor revisions to programming examples chapter 25
clarified the Important statement about
illegal opcodes
chapter 26
new format all chapters and appendices
To help you find new information in this publication, we have included
change bars as shows to the left of this paragraph.
Summary of Changes

Summary of Changes
i
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using This Manual 11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Differences 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
What's this User Manual Contains 12
. . . . . . . . . . . . . . . . . . . . . . . .
Vocabulary 12
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conventions 13
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related
Publications
14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Fundamentals of a Programmable Controller 21. . . . . . . . . . .
Chapter
Objectives
21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Traditional Controls 21
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programmable Systems 22
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Four Major Sections 22
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Control Sequence 29
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Scan Sequence 210
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Features 31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Major Features 31
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processor Features 31
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Series Changes 32
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Features 33
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processors 33
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Optional
Equipment
37. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing
Y
our Programmable Controller 41. . . . . . . . . . . . . .
Chapter
Objectives
41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Hardware 41
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Planning Your Processor System 42
. . . . . . . . . . . . . . . . . . . . . . . . .
How
to Install Y
our Processor 413. . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 1 - Mounting the Backpanel 414
. . . . . . . . . . . . . . . . . . . . . . . .
Step 2 - Mounting and Grounding Components on the Backpanel 415
.
Step
3 - Setting the Switches within the Switch Group Assembly
422. .
Step 4 - Installing Keying Bands and Field Wiring Arms 424
. . . . . . . . .
Step
5 - Installing I/O Modules
426. . . . . . . . . . . . . . . . . . . . . . . . . .
Step 6 - Backup Battery 428
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step
7 - Installing the EEPROM Memory Module
429. . . . . . . . . . . . .
Step 8 - Installing the Processor 431
. . . . . . . . . . . . . . . . . . . . . . . . .
Step 9 - Installing the Power Supply 431
. . . . . . . . . . . . . . . . . . . . . .
Table of Contents

Table of Contentsii
Step 10 - Connecting to the Field Wiring Arms 432. . . . . . . . . . . . . . .
Step 11 - Connecting Power to the Processor or Power Supply 437
. . .
Step 12 - Connecting the Industrial Terminal 442
. . . . . . . . . . . . . . . .
Master Control Relay 443
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Starting
Y
our Processor 51. . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
51. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Verify Your System's Addresses 51
. . . . . . . . . . . . . . . . . . . . . . . . .
Status Indicators for I/O Modules 53
. . . . . . . . . . . . . . . . . . . . . . . . .
Addressing Your Hardware 54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Before You Supply AC Power 518
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Testing Output Devices 518
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Testing Input Devices 520
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Maintaining and Troubleshooting Your Processor 61. . . . . . .
Chapter
Objectives
61. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General 61
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preventive Maintenance 61
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Organization 71. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
71. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction 71
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Areas 72
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adjusting the Data Table 77
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expanding the Data Table Between 48 and 128 Words 77
. . . . . . . . .
Expanding the Data Table Between 130 and 256 Words 79
. . . . . . . .
User Program 711
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Storage 711
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Scan Theory 81. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
81. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Scan Function 81
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Average Scan Time 83
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RelayLike Instructions 91. . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
91. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Logic 91
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bit
Examining
93. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Examine On and Examine Off 94
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Bit
Controlling
95. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output Energize 95
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output
Latch/Unlatch
96. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Branching Instructions 98
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Table of Contents iii
Branch
Start/End
99. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Nesting 911
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program Control Instructions 101. . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
101. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction 101
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output Override Instructions 101
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Immediate
I/O Update Instructions
105. . . . . . . . . . . . . . . . . . . . . . . .
Timers and Counters 111. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
111. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction 111
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer Instructions 112
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer On Delay 112
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer
Of
f Delay
113. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Retentive Timer On 114
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Retentive Timer Reset 115
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Counter Instructions 117
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Up Counter 117
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Down Counter 118
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Counter Reset 119
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Manipulation and Comparison Instructions 121. . . . . . . .
Chapter
Objectives
121. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Get 121
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Put 122
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Compare Instructions 123
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Equal To 123
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Less Than 124
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Limit Test 125
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operations Involving Transfer and Comparison Instructions 128
. . . . . .
Equal To or Less Than 128
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Greater Than 129
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Equal To or Greater Than 1210
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Get Byte 1211
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Get
Byte/Put
1211. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ThreeDigit Math Instructions 131. . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
131. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ThreeDigit
Math
131. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering a ThreeDigit Math Instruction 133
. . . . . . . . . . . . . . . . . . . .

Table of Contentsiv
EAF Math Instructions 141. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
141. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two Operand EAFs 141
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Addition and Subtraction 146
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Multiplication and Division 148
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Y
to the X
149. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
One Operand EAFs 1410
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exponential and Square Root 1414
. . . . . . . . . . . . . . . . . . . . . . . . . . .
10
to the X
1417. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reciprocal 1418
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BCD to Binary 1419
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Binary
to BCD
1420. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EAF
Logarithmic, T
rigonometric, and FIFO Instructions 151. . .
Chapter
Objectives
151. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
One Operand EAFs 151
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Log to Base 10 or Log to Base e 155
. . . . . . . . . . . . . . . . . . . . . . . . .
Sine and Cosine 156
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FIFO Load and FIFO Unload 157
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
EAF Process Control Instructions 161. . . . . . . . . . . . . . . . . . .
Chapter
Objectives
161. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PID Control 161
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Loop Considerations 165
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming 165
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entry and Display of a Selectable Timed Interrupt
(STI) Controlled PID Function 1614
. . . . . . . . . . . . . . . . . . . . . . . .
Software
Manual Control Station
1620. . . . . . . . . . . . . . . . . . . . . . . . .
Cascading Loops 1621
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DeScaling
Inputs
1623. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Averaging and Standard Deviation Functions 1634
. . . . . . . . . . . . . . . .
Difference Between ThreeDigit and SixDigit Functions 1634
. . . . . . . . .
Wall Clock/Calendar 1645
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jump Instructions and Subroutine Programming 171. . . . . . . .
Chapter
Objectives
171. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jump 171
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jump to Subroutine 172
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Label 172
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Return 173
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering Jump Instructions 173
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subroutine Area Instruction 173
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Table of Contents v
Block Transfer 181. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
181. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic Operation 181
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Block Transfer Format 184
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Block Transfer Read 188
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Block Transfer Write 1811
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BiDirectional Block Transfer 1812
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Multiple
Reads of Dif
ferent Block Lengths 1816. . . . . . . . . . . . . . . . . . .
Buffering
Data
1817. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two
Get Method
1820. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Support Rungs 1823
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Transfer File Instructions 191. . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
191. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FiletoFile Move Instruction 192
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
WordtoFile Move Instruction 1913
. . . . . . . . . . . . . . . . . . . . . . . . . . .
FiletoWord Move Instruction 1914
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Monitor Display 1916
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adjusting the Data Table Size 1918
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Bit Shift Registers 201. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
201. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bit
Shift Left
201. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bit
Shift Right
205. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Examine
Of
f Bit Shift
207. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Examine
On Bit Shift
209. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Set
Bit Shift
2011. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reset
Bit Shift
2013. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencers 211. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
211. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparison
with File Instructions
211. . . . . . . . . . . . . . . . . . . . . . . .
Mask 212
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming
Limitations
213. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencer Instructions 213
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencer
Input
215. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencer
Output
2113. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencer Load 2120
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Table of Contentsvi
Selectable Timed Interrupt 221. . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
221. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction 221
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Selectable Timed Interrupt 223
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operational Overview 224
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Report Generation 231. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
231. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Report Generation Commands 232
. . . . . . . . . . . . . . . . . . . . . . . . . .
Entering a Message 238
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Graphic Programming 2316
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program
Editing
241. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
241. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Editing a Program 241
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Online Data Change 246
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Search Functions 247
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Clearing Memory 2411
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Programming Aids 2413
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Online Programming 2415
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data
Initialization Key
2416. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Techniques 251. . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objectives
251. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OneShot Programming 251
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Restart 253
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cascading Timers 254
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Temperature Conversions 255
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program Control 259
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program Troubleshooting 261. . . . . . . . . . . . . . . . . . . . . . . . .
Chapter
Objective
261. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run Time Errors 261
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bit
Monitor/Manipulation
263. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contact Histogram 263
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Force Functions 265
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Temporary End Instruction 267
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Testing Your Program 269
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ERR Message for an Illegal Opcode 2610
. . . . . . . . . . . . . . . . . . . . . .

Table of Contents vii
Specifications A1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processor Comparison Chart B1. . . . . . . . . . . . . . . . . . . . . .
Number Systems C1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Objectives C1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Decimal Numbering System C1
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Octal Numbering System C2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Binary Numbering System C3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hexadecimal Numbering System C5
. . . . . . . . . . . . . . . . . . . . . . . . .
Glossary D1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction D1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Quick Reference E1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
List of References E1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adjusting the Data Table E2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Block Transfer Instructions E4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Clearing Memory E6
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Counter Instructions E7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Monitor Functions E8
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Transfer File Instructions E9
. . . . . . . . . . . . . . . . . . . . . . . . . . .
EAF Function Numbers E10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Editing Functions E11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Execution Times and Words Per Instruction E12
. . . . . . . . . . . . . . . . .
FIFO Load and FIFO Unload E16
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Graphic Programming E17
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Help E19
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Layout E20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Structure E21
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PID Control Block E24
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PROC Indicator E28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Report Generation E29
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Search E30
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencer Instructions E31
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Switch Group Assembly Settings E32
. . . . . . . . . . . . . . . . . . . . . . . . .
Timer Instructions E34
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Diagnostic Word 027 E35
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 1
1-1
Using This Manual
Read this chapter before you use your processor.
Important: This manual is for the series D Mini-PLC-2/02,
Mini-PLC-2/16 and Mini-PLC-2/17 processors. See the Series Changes on
page 3-2 for the differences with other processor series.
This manual describes the Mini-PLC-2/02, Mini-PLC-2/16 and
Mini-PLC-2/17 processors. Unless stated otherwise, assume the features
or instructions are common to all the processors.
Feature MiniPLC2/02 MiniPLC2/16 MiniPLC2/17
Size of memory (words) 2K 4K 7.75K
Size of EEPROM backup (words) 4K 4K 8K
Data table expansion (words) 1920 3968 7808
EAF instructions (up to 12 digits) Add
Subtract
Multiply
Divide
Add
Subtract
Multiply
Divide
Add
Subtract
Multiply
Divide
EAF instructions Square Root
BCD to Binary
Binary to BCD
FIFO Load
FIFO Unload
Log10
Sin X
Cos X
10x
Square Root
BCD to Binary
Binary to BCD
FIFO Load
FIFO Unload
Log10
Sin X
Cos X
10x
Square Root
BCD to Binary
Binary to BCD
FIFO Load
FIFO Unload
Log10
Sin X
Cos X
10x
Additional EAF instructions none none Loge
y+/x
e+/x
Reciprocal of x
Averaging
Standard
Deviation
PID
Wall Clock/Calendar
Chapter Objectives
Differences

Using This Manual
Chapter 1
1-2
This manual is divided into eight sections (Table 1.A):
Table 1.A
Sections of the MiniPLC2/02, MiniPLC2/16, and MiniPLC2/17
Processor User Manual
Information Sections What's Covered In Chapters
Overview how to use this manual; fundamentals of
programmable controllers
12
Hardware the processor's hardware features; how to assemble,
install, start, maintain, and troubleshoot the processor
3
Basic instruction set how to use basic instructions common to all PLC2
family processors
413
Advanced instruction set how to use advanced instructions unique to some
the processors
1422
Programming procedures and
troubleshooting
how to use special programming techniques and follow
a troubleshooting guide so you can minimize production
down time
2326
Specifications, comparison chart,
number systems, and glossary
specifications; PLC2 family comparison chart;
explanation of number systems; and list of processor
terms used in this manual
Appendices AD
Quick reference selected tables in this manual Appendix E
This manual is procedure oriented. It tells you how to program and
operate your Mini-PLC-2/02, Mini-PLC-2/16, and Mini-PLC-2/17
processor. If you need to learn more about these processors, contact your
local Allen-Bradley representative or distributor.
To make this manual easier to read and understand, we refer to the:
We Refer to the: As the:
MiniPLC2/02, MiniPLC2/16, and
MiniPLC2/17 Processors
processors
Electrically Erasable Programmable
Read Only Memory
EEPROM
Programmable Read Only Memory PROM
Execute Auxiliary Function EAF
Complementary Metal Oxide
Semiconductor Random Access Memory
CMOS RAM
Industrial Terminal (cat. no. 1770T3) 1770T3 terminal
A glossary at the back of this manual clarifies technical terms.
What's this User
Manual Contains
Vocabulary

Using This Manual
Chapter 1
1-3
A word equals 16 bits; a byte equals 8 bits (1/2 of a word).
Words in [ ] denote a key name or symbol. Words in < > denote
information that you must provide - for example, an address value.
All word addresses are displayed in the octal numbering system.
Therefore, references to base 8 are not displayed.
Word values are displayed in:
decimal (0-9) for timers, counters, and mathematics
CTU
010
00
030
PR 555
AC 123
Decimal
hexadecimal values (0-9, A-F) for Get and Put instructions
010
00
030
Hexadecimal
010
00
011 012
GG
00FFF 123
Important: Numbers 0-9 are displayed the same in decimal and
hexadecimal.
octal byte values for examine on and output energize instructions
0101 030
Octal
00
B
237
Keystroke directions are divided into two columns:
tells you what key or keys to press
tells you the processor’s action
Conventions

Using This Manual
Chapter 1
1-4
Figure 1.1 shows the keystrokes to produce a display.
Figure 1.1
Illustration
Showing Keystroke Conventions
Start by positioning your cursor on the words SEQUENCER INPUT.
Use the arrow keys to move the cursor.
The word display appears in the lower left hand corner of the screen.
DISPLAY
0
BINARY DATA MONITOR
SEQUENCER OUTPUT
COUNTER ADDR: 200 STEP: 001 SEQUENCER LENGTH: 006
FILE: 400- 413
OUTPUT ADDR: 110 201
DATA: 00000000 00000000 00000000 00000000
MASK ADDR: 070 071
DATA: 00000000 00000000 00000000 00000000
STEP WORD 1 WORD 2
00000000
00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
001
002
003
004
005
006
DAT
A: 00000000 00000000
The publication index, publication SD 499, lists all available publications
to further inform you about products related to the Mini-PLC-2/02,
Mini-PLC-2/16, and Mini-PLC-2/17 processors. Consult your local
Allen-Bradley distributor or sales engineer for information regarding this
publication or any needed information.
Related Publications

Chapter 2
2-1
Fundamentals of a Programmable Controller
In this chapter, you review general fundamentals common to our
programmable controllers. This chapter:
describes what a programmable controller does
describe the functions of a programmable controller
describes the four major sections of a programmable controller
gives an example of a simple program
You are probably familiar with the traditional methods of machine control.
Control Panel
Relays
Machine
Sensing
Devices Output
Devices 11591
Sensing devices located on the machine detect changes in the machine’s
condition. For instance, a part arriving at a work station contacts and
closes a limit switch, the sensing device. As a result, an electrical circuit is
completed and a signal is sent to the control panel.
At the control panel, the electrical signal enters a bank of relays or other
devices, such as solid state modules. Circuits within the control panel open
or close causing additional electrical signals to be sent to output devices at
the machine. For example, a relay energized by the limit switch closed by
the arriving part may complete another circuit energizing the output
device, a clamp, which secures the part at the work station.
Chapter Objectives
Traditional Controls

Fundamentals of a
Programmable Controller
Chapter 2
2-2
Systems run by programmable controllers operate in much the same way.
Programmable controllers can perform many of the functions of traditional
controls. Input sensing devices report machine conditions; output devices
respond to commands.
Control Panel
Programmable
Machine
Sensing
Devices Output
Devices 11592
Conditons
Controller
Action
Command
Wiring between the machine and the controller provides electrical paths
from the sensing devices to the controller and from the controller to the
output devices.
However, instead of wiring relays together to produce a desired response,
you simply tell your programmable controller how you want it to respond.
A program tells your programmable controller what you want it to do. A
program is nothing more than a set of instructions you give the
programmable controller telling it how to react to certain conditions within
the machine.
A typical programmable controller system usually consists of four
major sections:
processor
input modules
output modules
power supply
Programmable Systems
The Four Major Sections

Fundamentals of a
Programmable Controller
Chapter 2
2-3
Power Supply
Processor
Information
Limit, Proximity, Pressure,
Action
(Decision Making)
•Temperature Switches
Push Buttons
Logic
BCD
Analog
•
•
•
•
Solenoids•
Motor Starters
Indicators
Alarms
Logic
BCD
Analog
•
•
•
•
•
•
Input Output
Processor
The first section of a programmable controller is the processor. The
processor might be called the “brains” of the programmable controller. It
is divided into halves:
central processing unit
memory
CPU
Data
Table
Program
Storage
Message
Storage
Memory
Processor
Section
Central Processing Unit
The Central Processor Unit (CPU) makes decisions about what the
processor does according to the program you write.

Fundamentals of a
Programmable Controller
Chapter 2
2-4
Memory
Memory serves three functions:
stores information in the data table that the CPU may need
stores sets of instructions called a program
stores messages
Data Table
The area of memory where data is controlled and used, is called the data
table. The data table is divided into several smaller sections according to
the type of information to be remembered. These smaller sections are
called:
output image table
input image table
timer/counter storage
Output Image Table
Input Image Table
Timer/Counter
Storage
Data Table
This memory area: Serves this purpose:
output image tables The output image table controls the on or off status of the
output devices wired to the output module's terminals. If an
output image table bit is ON (1), its corresponding output
device is ON (energized). If a bit is OFF (0), its corresponding
output device is OFF (deenergized). Output image table bits
are controlled by the user's program.
input image tables The input image table duplicates the on or off status of the
input devices. If an input device is ON (closed), its
corresponding input image table bit is ON (1). If an input
image table bit is OFF (open), its corresponding input image
table bit is OFF (0). Input image table bits are monitored by the
user's program.
timer/counter storage Timer and Counter instructions are output instructions. They
provide many of the capabilities available with timing relays
and solidstate timing and counting devices. Usually
conditioned by examine instructions, they keep track of timed
intervals or counted events according to the logic of the rung.

Fundamentals of a
Programmable Controller
Chapter 2
2-5
I/O Image Tables
The input image table reflects the status of the input terminals. The output
image table reflects the status of bits controlled by the program.
Each image table is divided into a number of smaller units called bits. A
bit is the smallest unit of memory. A bit is a tiny electronic circuit that the
processor can turn on or off. Bits in the image table are associated with a
particular I/O terminal in the input or output section.
When the processor detects a voltage at an input terminal, it records that
information by turning the corresponding bit on. Likewise, when the
processor detects no voltage at an input terminal, it records that
information by turning the corresponding bit off. If, while executing your
program, the CPU decides that a particular output terminal should be
turned on or off, it records that decision by turning the corresponding bit
on or off. In other words, each bit in the I/O image tables corresponds to
the on or off status of an I/O terminal.
When people who work with personal computers talk about turning a bit
on, they use the term “set.” For example - “The processor sets the bit”
means “turns it on.” On the other hand, we use the term “reset” when we
talk about turning the bit off - for example, “The processor reset the bit.”
Picture memory as a page that has been divided into many blocks. Each
block represents one bit. Since each bit is either on or off, we could show
the state of each bit by writing “on” or “off” in each block. However, there
is an easier way. We can agree that the numeral one (1) means on and that
the numeral zero (0) means off. We can show the status of each bit by
writing 1 or 0 into the appropriate block. For example, you might hear
expressions like, “The CPU responded by writing a one into the bit when
the limit switch closed.” Of course, the processor didn’t really write a one
into memory: it simply set the bit by turning it on.
When the I/O device is: The bit status is said to be:
on
on
1
set
off
off
0
reset
If you heard the expression, “The processor wrote a zero into that bit
location.” What actually happened? If you said the processor merely reset
the bit by turning it off, you’re right.

Fundamentals of a
Programmable Controller
Chapter 2
2-6
Program Storage
Program storage takes up the largest portion of memory. This is where the
user’s program is stored. Each program is made up of a set of statements.
Each statement does two things:
It describes an action to be taken. For instance, it might say, “Energize
motor starter number one.”
It describes the conditions that must exist in order for the action to
take place.
Statement
Statement
Statement
Statement
Statement
Statement
Program Storage Area
of Memory
ActionConditions Program
Statement
Program
For example, you may want this action to take place: “Whenever a certain
limit switch closes.” So your condition could be: “If limit switch number
two is closed,...” The action would be: “energize motor starter number
one.” Therefore, when limit switch number two at the machine closes, the
programmable controller energizes the motor starter. If limit switch
number two does not close, the programmable controller does not energize
the motor starter. Thus, when limit switch number two opens, the
programmable controller de-energizes the motor starter because that action
is implied in the statement.
A program is made up of a number of similar statements. Typically, there
is one statement for each output device on the machine. Each statement
lists the conditions that must be met and then, states the action to be taken.
Each condition is represented by a specific instruction; therefore, each
action is represented by a specific instruction. These instructions tell the
processor to do something with the information stored in the data
table.Some instructions tell the processor to read what’s written in the
image table. When the processor is instructed to read from an image table,
it examines a specific bit to see if a certain I/O device is on or off.
Other instructions tell the processor to write information into the image
table. When the processor is instructed to write into the output image
table, it writes a one or a zero into a specific bit. The corresponding output
device will turn on or off as a result.
This manual suits for next models
2
Table of contents
Other Allen-Bradley Computer Hardware manuals

Allen-Bradley
Allen-Bradley SLC 5/03 User manual

Allen-Bradley
Allen-Bradley SLC 5/04 User manual

Allen-Bradley
Allen-Bradley PLC-5 MAP/OSI User manual

Allen-Bradley
Allen-Bradley 1747-DCM User manual

Allen-Bradley
Allen-Bradley SLC 5/01 User manual

Allen-Bradley
Allen-Bradley SLC 500 Series User manual

Allen-Bradley
Allen-Bradley SLC 5/01 User manual

Allen-Bradley
Allen-Bradley 2094-AL15S User manual

Allen-Bradley
Allen-Bradley 2707-MVH232 User manual

Allen-Bradley
Allen-Bradley 1771-SF1 User manual