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

The text of a manual · part 4 of 59

Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual: 2 - Fundamentals of a Programmable Controller

Pages 16 to 27 of 492, from Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual

The original document is the PDF (2.5 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-LX / LXP

Page 16

Chapter

2

Fundamentals of a Programmable Controller

Chapter Objectives

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

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 17

Chapter 2 Fundamentals of a Programmable Controller

Programmable Systems

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. Programmable Controller

Control Panel

Action Command

Conditons

Sensing Devices

Machine Output Devices

11592

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.

The Four Major Sections

A typical programmable controller system usually consists of four major sections: processor input modules output modules power supply

2-2

Page 18

Chapter 2 Fundamentals of a Programmable Controller

Power Supply

Processor (Decision Making)

Action

Information

Input

Output

• Limit, Proximity, Pressure, Temperature Switches

• Push Buttons • Logic • BCD • Analog

• Solenoids • Motor Starters • Indicators • Alarms • 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 according to the program you write.

2-3

Page 19

Chapter 2 Fundamentals of a Programmable Controller

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

2-4

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 (de-energized). 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 solid-state 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.

Page 20

Chapter 2 Fundamentals of a Programmable Controller

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.

2-5

Page 21

Chapter 2 Fundamentals of a Programmable Controller

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

Program

Statement Statement Statement Program Storage Area of Memory Conditions

Action

Program Statement

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.

2-6

Page 22

Chapter 2 Fundamentals of a Programmable Controller

Message Storage The third area of memory, message storage, begins after the end statement in the user’s program. Two alphanumeric characters can be stored in a word. Messages are entered into memory from either a 1770-T3 terminal or a peripheral device. Messages are displayed on a 1770-T3 terminal or a peripheral device each time a message is required. The messages are activated through program control by programming specific instructions in the ladder diagram program. Input Modules The input modules of a programmable controller have four 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 LED indicators. The indicator is on when there is a voltage applied to it terminal. The indicator 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. Input indicators are only associated with terminals used for wiring sensing devices to the input section. The terminal that’s used to provide a ground for the sensing circuits has no indicator. Conditioning Another function of input modules is signal conditioning. Voltage levels used at the machine are usually not compatible with the voltage levels used within the programmable controller. The input modules receives the electrical signal from the machine and converts it to a voltage level compatible with the programmable controller’s circuitry. Isolation The input isolates the machine circuitry from the programmable controller’s circuitry. Isolation helps protect the programmable controller’s circuitry from unwanted and dangerous voltage levels that may occur occasionally at the machine or in the plant’s wiring system.

2-7

Page 23

Chapter 2 Fundamentals of a Programmable Controller

Output Modules The output modules of a programmable controller have four functions: termination indication conditioning isolation Termination The output provides terminals for the field wiring going to the output devices on the machine. Indication The output of most modules provides a visual indication of the selected state of each output device with LED indicators. The output status indicator is on when the output device is energized. A common term applied to either input status indicators or output status indicators is I/O status indicators. I/O stands for either input or output. In older modules, when power is present at the output terminals, the status indicators are ON. In high density modules, power may not be present at the output terminals for the status indicator to be ON. Conditioning The output conditions the programmable controller’s signals for the machine. That is, it converts the low-level dc voltages of the programmable controller to the type of electrical power used by the output devices at the machine. Isolation The output isolates the circuitry of the programmable controller from unwanted and dangerous voltages that occasionally occur at the machine or the plant’s wiring system. Some situations require additional external protection. Power Supply The power supply provides low-level dc voltage for the electronic circuitry of the processor, its input and output modules. It converts line voltages to the lower logic voltages required by the processor and its input and output modules.

2-8

Page 24

Chapter 2 Fundamentals of a Programmable Controller

Control Sequence

Let’s look at a simple example to see the sequence of events that take place in controlling a machine with a programmable controller (Figure 2.1). Suppose you are making a part. The motor driven conveyor carries a unit to the work area. The limit switch detects wen the part arrives at the work area. when that happens, we want the conveyor to stop so you can work on the part. Figure 2.1 A Simplified Example of a Machine with a Programmable Controller Controller Input

Limit Switch

Conveyor

Output

Conveyor Motor

Unit 11594

Notice how the limit switch and motor are wired to the programmable controller. The limit switch, wired to terminal 02, is normally-closed. The arriving part will open the switch. Therefore, the program statement controlling the conveyor motor must read: “If there is voltage at input terminal 02 (limit switch), then energize output terminal 02 (conveyer motor).” The conveyor motor is wired to output terminal 02. Important: Figure 2.1 is for demonstration purposes only. We do not show the associated wiring, a motor starter, or an emergency stop button. Since the limit switch is wired normally-closed, the conveyor motor runs until the arriving part opens the switch. At that time, the condition for energizing the motor is not longer met. Therefore, the motor is de-energized. When the condition is met, we say it is true. When the condition is not met, we say it is false. There may be more than one condition which must be met before an action is executed. When all the conditions are met, the action is executed and we say the statement is true. When one or more of the conditions are false, the action is not executed and we say the statement is false. 2-9

Page 25

Chapter 2 Fundamentals of a Programmable Controller

Scan Sequence

On power up, the processor begins the scan sequence (Figure 2.2) with a program pre-scan. This pre-scan is completed as if the entire program lies within an active MCR zone. Next the processor completes the I/O scan. During the I/O scan, data from input modules is transferred to the input image table. Data from output image table is transferred to the output modules. Figure 2.2 Scan Sequence

Output Image Table

Output Terminals

Copy output image table status into output terminal circuits. I/O Scan

Input Image Table

Input Terminals

Copy input terminal status into input image table.

Program Statement

Program Scan

Execute each program rung in sequence, writing into bits in the data table, including the output image table.

11597

2-10

Page 26

Chapter 2 Fundamentals of a Programmable Controller

Next, the processor scans the program. It does this statement by statement. Each statement is scanned in this way: 1.

For each input instruction, the processor checks, or “reads,” the image table to see if the condition has been met.

2.

If the set of conditions has been met, the CPU writes a 1 into the bit location in the output image table corresponding to the output terminal to be energized. On the other hand, if the set of conditions has not been met, the processor writes a 0 into the bit location, indicating that the output terminal should not be energized.

Here is a simple explanation of the program. If input 02 is on, then turn on output 02. If input 02 is off, then turn off output 02. The program could be written this way: If (condition)

Then (action)

Input bit 02 is on

Turn output bit 02 on

In this example, the processor reads a 1 at input bit location 02 and knows that the condition has been met. The processor then carries out the action instruction by writing a 1 into output bit location 02. If there were more statements in the program, the processor would continue in this same manner scanning each statement and executing each instruction until it reached the end of the program. Statement by statement, the processor would write a 0 or a 1 into an output bit as directed by the program. Then, the processor would read specific image table bits to see if the proper set of conditions were met. After reading and executing all program statements, the processor scans the output image table and energizes or de-energizes output terminals. The processor then goes to the input modules to update the input image table. Now the entire process is repeated. In fact, it’s repeated over and over again, many times a minute. Each time, the processor sets or resets output bits. Next, the processor senses the status of the input terminals. Finally, the processor scans the program and orders each output terminal on or off according to the state of its corresponding bit in the output image table. When forcing is attempted, the processor’s I/O scan slows down to do the forcing (see chapter 19). When forcing is terminated, the processor automatically switches back to the faster I/O scan mode. When this example begins, the processor is energizing output terminal 02 because output bit 02 is on. When the part is conveyed to the work station, it turns the limit switch off. When the limit switch is off, there is no voltage at input terminal 02. The processor scans the input image table, senses no voltage, and responds by writing a zero into bit 02 in the input image table. 2-11

Page 27

Chapter 2 Fundamentals of a Programmable Controller

The processor scans the program. Our program states that if (conditions) input bit 02 is on, turn on output 02. If input bit 02 is off then output bit 02 is off. Since the alter condition is not true, the processor turns off output bit 02. When the processor next scans the output image table, it sees the zero in output bit 02 and responds by de-energizing output terminal 02. The action causes the conveyor to stop.

2-12