Lecture 3
Lecture 3
PLC Course
➢The memory map or structure for a PLC processor consists of several areas, some of
these having specific roles.
➢Allen-Bradley PLCs have two different memory structures identified by the terms rack-
based systems and tag-based systems. The memory organization for rack-based systems
will be covered in this chapter .
➢Individual sections, their order, and the sections’ length will vary and may be
fixed or variable, depending on the manufacturer and model.
1. Program Files
Program files are the areas of processor memory where ladder logic programming
is stored. They may include:
▪ System functions (file 0)—This file is always included and contains various
system-related information and user-programmed information such as
processor type, I/O configuration, processor file name, and password.
1. Program Files
▪ Reserved (file 1)—This file is reserved by the processor and is not accessible
to the user.
▪ Main ladder program (file 2)—This file is always included and contains user-
programmed instructions that define how the controller is to operate.
▪ program file.
2. Data Files
The data file portion of the processor’s memory stores input and output status,
processor status, the status of various bits, and numerical data. All this
information is accessed via the ladder logic program. These files are organized
by the type of data they contain and may include:
▪ Output (file 0)—This file stores the state of the output terminals for the
controller.
▪ Input (file 1)—This file stores the status of the input terminals for the
controller
2. Data Files
▪ Status (file 2)—This file stores controller operation information and is useful
for troubleshooting controller and program operation.
▪ Bit (file 3)—This file is used for internal relay logic storage.
▪ Timer (file 4)—This file stores the timer accumulated and preset values and
status bits.
▪ Counter (file 5)—This file stores the counter accumulated and preset values
and status bits.
2. Data Files
▪ Control (file 6)—This file stores the length, pointer position, and status bit for
specific instructions such as shift registers and sequencers.
▪ Integer (file 7)—This file is used to store numerical values or bit information.
Part 1: I for input, and a colon to separate the module type from the slot. O for
output and a colon to separate the module type from the slot.
Part 2: The module slot number and a forward slash to separate the slot from
the terminal screw.
Program Scan
When a PLC executes a program, it must know—in real time—when external
devices controlling a process are changing. During each operating cycle, the
processor reads all the inputs, takes these values, and energizes or de-energizes
the outputs according to the user program. This process is known as a program
scan cycle.
Program Scan
Program Scan
There are two basic scan patterns that different PLC manufacturers use to
accomplish the scan function ( Figure 5-11 ). Allen-Bradley PLCs use the
horizontal scan by rung method. In this system, the processor examines input
and output instructions from the first command, top left in the program,
horizontally, rung by rung.
Program Scan
Modicon PLCs use the vertical scan by column method. In this system, the
processor examines input and output instructions from the top left command
entered in the ladder diagram, vertically, column by column and page by page.
Pages are executed in sequence. Both methods are appropriate; however,
misunderstanding the way the PLC scans a program can cause programming
bugs.
Program Scan
❖The standard IEC 61131 was established to standardize the multiple languages
associated with PLC programming by defi ning the following five standard
languages:
▪ Function Block Diagram (FBD)—a graphical depiction of process flow using simple and
complex interconnecting blocks.
▪ Sequential Function Chart (SFC)—a graphical depiction of interconnecting steps, actions, and
transitions.
▪ Instruction List (IL)—a low-level, text-based language that uses mnemonic instructions.
Relay-Type Instructions
➢Representations of contacts and coils are the basic symbols of the logic ladder diagram
instruction set.
➢The three fundamental symbols that are used to translate relay control logic to contact symbolic
logic are Examine If Closed (XIC), Examine If Open (XIO), and Output Energize (OTE).
➢ Each of these instructions relates to a single bit of PLC memory that is specified by the
instruction’s address.
Relay-Type Instructions
➢The symbol for the Examine If Closed (XIC) instruction is shown in the Figure below. The XIC
instruction, which is also called the Examine-on instruction, looks and operates like a normally
open relay contact.
Relay-Type Instructions
➢The symbol for the Examine If Open (XIO) instruction is shown in the Figure below. The XIO
instruction, which is also called the Examine-off instruction, looks and operates like a normally
closed relay contact.