The text of a manual · part 2 of 29
1772 Mini PLC-2/05 Processor (Cat. No. 1772-LS, LSP) Programming and Operations Manual, pages 11 to 20
Pages 11 to 20 of 289
The original document is the PDF (1.4 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 1772-LSP
Page 11
ii
Table of Contents
Block Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-1
Selectable Timed Interrupt . . . . . . . . . . . . . . . . . . . . . . . . .
15-1
Program Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16-1
Rules for Editing Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16-1
Report Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17-1
Programming Techniques . . . . . . . . . . . . . . . . . . . . . . . . .
18-1
Program Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . .
19-1
Number Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A-1
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-1
Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C-1
Page 12
1
Chapter
Before You Begin
Important: Read this chapter before you use the Mini-PLC-2/05 Processor (cat. no. 1772-LS,-LSP). It tells you how to use this manual.
Purpose
The Mini-PLC-2/05 processor is functionally similar to the Mini-PLC-2/15 processor. The Mini-PLC-2/05 processor has some additional features: selectable timed interrupt memory protect switch fast I/O scan user selectable PROM/RAM backup 3K memory expanded mathematics However, this processor does not have a mode select switch.
To the Reader
This manual is divided into six parts (Table 1.A). Table 1.A Parts of the Mini-PLC-2/05 Processor Programming and Operations Manual Part
Title
What's Covered
A
Hardware Overview basic theory concerning the hardware features available when using this processor
B
Memory/Instruction Set describes the memory and informs you about the techniques you can use when programming this processor
C
Program Editing how to edit your program once it has been entered into the memory
D
Report Generation/Application Program Techniques how to do report generation and use special program techniques
E
Program Troubleshooting acts as a guide so you can minimize production down time
F
Appendices contains tables and reference information useful when programming your processor
This manual is procedure oriented. It tells you how to program and operate your Mini-PLC 2/05 Processor. If you need to learn more about the Mini-PLC-2/05 Processor, contact your local Allen-Bradley representative or distributor.
1-1
Page 13
Chapter 1 Before You Begin
Vocabulary
To make this manual easier to read and understand, we refer to the: We Refer to the:
As the:
Mini-PLC-2/05 Processor processor
Electrically Erasable Programmable Read Only Memory
EEPROM
Execute Auxiliary Function
EAF
Complementary Metal Oxide Semi-conductor Random Access Memory
CMOS RAM
Industrial Terminal (cat. no. 1770-T3)
1770-T3 terminal
A glossary at the back of this manual clarifies technical terms.
Conventions
A word equals 16 bits; a byte equals 8 bits (1/2 a word). Words in [ ] denote the key name or symbol. Words in < > denote information that you must provide - for example, an address value. Word values are displayed in: decimal (0-9) for timers, counters, and mathematics 010
030 CTU
00 Decimal
PR 555 AC 123 hexadecimal values (0-9, A-F) for gets and puts 010 00
011 G FFF
012 G 123
030 00
Hexadecimal
Important: Numbers 0-9 are displayed the same in decimal and hexadecimal. octal for byte values 0101 B 237 Octal
1-2
030 00
Page 14
Chapter 1 Before You Begin
Keystroke directions are divided into two columns:
tells you what key or keys to press tells you the processor’s action.
Related Publications
The publication index, publication SD 499, lists all available publications to further inform you about products related to the Mini-PLC-2/05 processor. Consult your local Allen-Bradley distributor or sales engineer for information regarding this publication or any needed information.
1-3
Page 15
Chapter
2
An Introduction to Programmable Controllers
Chapter Objectives
In this chapter, you review general fundamentals common to our programmable controllers. This chapter: describes what a programmable controller does describe the four major sections of a programmable controller describes how the four major sections of a programmable controller interact gives an example of a simple program
Traditional Controls
You are probably familiar with the traditional methods of machine control. Relays
Sensing Devices
Control Panel
Machine 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.
2-1
Page 16
Chapter 2 An Introduction to Programmable Controllers
Programmable Controls
Programmable controllers can perform many of the functions of traditional controls. Sensing devices report to the processors. The output devices at the machine operate the same as they would with traditional controls. Programmable Controller
Control Panel
Action Command
Conditons
Sensing Devices
Machine Output Devices
11592
The field wiring between the machine and the control panel provides electrical paths from the sensing devices to the control panel, and from the control panel to the output devices. However, inside the control panel you’ll find a programmable controller rather than relays or discrete solid state devices. Instead of wiring those devices and relays together to produce a desired response, you simply tell your programmable controller by means of a program how you want it to respond to the same conditions. Programming is telling 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 different conditions within the machine.
The Four Major Sections
Let’s take a closer look at a typical programmable controller. It usually consists of four major sections: processor input output power supply
2-2
Page 17
Chapter 2 An Introduction to Programmable Controllers
Power Supply
Processor (Decision Making)
Information
Action
Input
Output
• Limit, Proximity, Pressure,
• Solenoids • Motor Starters • Indicators • Alarms • Logic • BCD • Analog
Temperature Switches
• Push Buttons • Logic • BCD • Analog
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
Processor Section
Data Table
Memory
Program Storage Message Storage
Central Processing Unit The central processor unit (CPU) makes decisions about what the processor does. 2-3
Page 18
Chapter 2 An Introduction to Programmable Controllers
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 Data Table Output Image Table Input Image Table Timer/Counter Storage
At this time, we will only discuss the input and output image tables and program storage. 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.”
2-4
Page 19
Chapter 2 An Introduction to Programmable Controllers
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. Program Storage The other major area of memory, program storage, takes up the largest portion of memory. You’ll recall that this is where your instructions to the programmable controller are stored. You’ll also recall that this set of instructions is called a program. Program Language A program is made up of 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
Program
Statement Statement Statement Program Storage Area of Memory Conditions
Action
Program Statement
2-5
Page 20
Chapter 2 An Introduction to Programmable Controllers
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.” The entire statement is then: “If limit switch number two is closed, then 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. Instructions 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.
Input The second section is the input, which serves four very important functions: termination indication conditioning isolation Termination The input provides terminals for the field wiring coming from the sensing devices on the machine. Indication The input of most modules also provides a visual indication of the state of each input terminal with indicators. The indicator is on when there is a voltage applied to it terminal. It is off when there is no voltage applied to its terminal. Since the indicator reveals the status of its terminal, it’s usually called an input status indicator. 2-6