You are on page 1of 29

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

23.04.2020
Today’s Topic

PLC REGISTERS

List of Contents:
 Characteristics of Registers
 Module Addressing
 Holding Registers
 Input Registers
 Output Registers
 Digital logic gates
 Conversion Examples Ladder Diagrams for process control
 Ladder diagrams & Sequence listings
 Ladder diagram construction and Flowchart for Spray Process system
What Are Registers?
A register is basically a storage space for units of memory that are used to transfer
data for immediate use by the CPU (Central Processing Unit) for data processing.
Also known as memory registers, they can actually form part of the computer
processor as a processor register.
What Are Shift Registers?
 Shift registers are digital memory circuitry found in devices such as calculators,
computers, and data processing systems.
 With the shift register, data or bits are entered into the system in a serial or parallel
manner.
 They enter from one direction, and as more data is added, shift positions until they
get to the output end.
 The two ends are referred to as the left and right ends.
 Movement of data can be from left to right, from right to left, or in both directions to
make a bidirectional register.
Device Functions
Data Data processing and value operations always occur when the
Register PLC conducts all kinds of sequential control, timing and
counting. The data register is used for storing the values or all
kinds of parameters.

Device indication: D0, D1, … are indicated as D and


numbered in decimal form.
File The file register is used for storing the data or all kinds of
Register parameters when the data registers required for processing the
data and value operations are insufficient. Every file register is
able to store a 16-bit word. Double words will occupy 2
adjacent file registers.

Device indication: K0, K1,…. numbered in decimal form.


Device Functions
Index E and F index registers are 16-bit data registers as other data registers.
Register They can be read and written and can be used in word devices, bit
devices or as a constant for index indication.
Device indication: E0 ~ E7, F0 ~ F7 are indicated as E and F and
numbered in decimal form.
In this case, F will be covered by E
and cannot be used anymore;
otherwise, the content in E (32-
bit) will be incorrect. So use of
DMOVP K0 E instruction, the
content in E (including F) will be
cleared to “0” when the power of
PLC is switched on. The
combination of E, F when use a 32-
bit index register: (F0, E0), (F1,
E1), (F2, E2), …(F7, E7)
When X0 = On, E0 = 8, F0 = 14,
D5E0 = D (5 + 8) = D13, D10F0 = D
(10 + 14) = D24. At this moment,
the content in D13 will be moved
to D24.
Characteristics of Registers:
 Within the PLC, Registers are found in 2 locations.
 The Microprocessor has INTERNAL REGISTERS, most of which are not directly
accessible by the User.
 These Registers helps the Control & Arithmetic and Logic units within the
processor.
 Accumulator Register, Data Registers, Index Registers, Condition Code Registers
and Instruction Registers – these Registers all work to temporarily store data.
 In addition to these Internal Registers, the CPU,s RAM also contains slots that are
designated to hold variable information.
 These locations or Address becomes EXTERNAL REGISTERS (16 Bit Registers
mostly).
 Each Bit location in a Register contains either 0 or 1.
 Registers are usually designated using prefixes followed by numbers
 HR256 – Holding Register 256.
 OG2 - Output Group Register number 2
Module Addressing
 The types of PLC Modules are
 PLC Input Module
 PLC Output Module
 In sum, we have PLC with I/O Modules consisting of group of Terminals.
 The location of an Input or Output terminal within a module group, within a Rack
will determine the device address.
 Each Output and Input device must have an Address.
 The scheme consists of 5-level Hierarchy starting at top with file type and
descending to a terminal number specifically
 FILE TYPE designates an INPUT or OUTPUT Module (I/O)
 FILE NUMBER specifies which particular I/O module.
 RACK Number determines which Rack the Module should sit in.
 GROUP is a set of Terminals within a Rack. Typically there would be 8 Groups in
a Rack (0-7)
 Terminal Number is a Bit Address for a Particular terminal, Input or Output
File Number
Only required when a Slot or Element Number
user defined file is Required
being specified
Word Number
File Type Only required if pointing to a
Required Word other than Word ZERO.
Defaults to Word ZERO

Bit or IN/OUT Number


I1:4.0/4 Only required when
addressing to “Bit Level”

Word Delimiter Bit Delimiter


Only required when specifying Only required when
File Delimiter to “Word Number” addressing to “Bit Level”
Required
Example:
 I2:36/28 –
 O0:43/05 -
Slot Numbers
The slot numbers in the rack of an S7-300 simplify addressing in the S7-300 environment. The position
of the module in the rack determine the first address on a module.

Slot 1
Power supply. This is the first slot by default.
A power supply module is not absolutely essential. An S7-300 can also be supplied with 24V directly.

Slot 2
Slot for the CPU.

Slot 3
Logically reserved for an interface module (IM) for multi-tier configurations using expansion racks. Even
if no IM is installed, it must be included for addressing purposes.
You can physically reserve the slot (such as for installing an IM at a later date) if you insert a DM370
dummy module.

Slots 4-11
Slot 4 is the first slot that can be used for I/O modules, communications processors (CP) or function
modules (FM).
Addressing examples:
• A DI module in slot 4 begins with the byte address 0 .
• The top LED of a DO module in slot 6 is called Q8.0 .

Note
Four byte addresses are reserved for each slot. When 16-channel DI/DO modules are used, two byte
addresses are lost in every slot!
Representation of RACK/SLOT Address
based PLC.

This figure is represented by TWO Drawer


file cabinet
1. One for Data Files
2. Other for Program Files.

The User Program


accounts for most of the
memory in a PLC System.

Program Files contains the


Logic that controls the
Machine Operation.

This Logic consists of


Instructions that are
programmed in the Ladder
Logic Format.
I/O Modules considered to be one element (WORD) files.
HOLDING REGISTERS:
A Holding or Working Register (HR) “Holds” the content of the Calculation, Arithmetic or
Logics.
It is in the Middle of the CPU.
In many PLC’s particularly in small ones, the Holding registers are not directly accessible
to Input or Output: Input and Output Registers (Single or Group) Interfaces the Holding
Register content to the outside world.
In Arithmetic Operations , a HR might contain the First operand, another HR, the second
operand and Final HR, the destination of the Mathematical manipulation
HOLDING REGISTERS: cont…
In Timer functions, the preset time value would be placed in a constant or designated
register.(The HR is a register in which the COUNT takes place.)
In Counter functions, the preset count value is placed in a constant or designated register.
(The HR is a register in which the COUNT takes place.)
In small PLC’s, there may be few as 16.
In large PLC’s there are hundreds of HR’s, all
accessible for programming use,
manipulation and analysis.
INPUT REGISTERS:
The Input Registers has basically the same characteristics as the HR, except that it is
readily accessible in the I/P modules terminals.
One Input Group Register receives data from 16 consecutive I/P ports.
The advantage of IG system is, we would need 16 registers to service 16 I/P’s ie. We
would use up more computer memory space to RUN programs.
Each IG Register Status controls one BIT Status.
When a port is enabled, it creates “1” corresponding bit slot and if the port is OFF, it
creates “0” in the corresponding bit slot.
OUTPUT REGISTERS:
Like Input Register, the Output Register has the same basic characteristics of the HR.
The number of output registers is normally equal to number of input registers.
One OG register can control 16 Outputs.
The grouping scheme for output group register is similar to Input Group Register system.
The output group register is particularly useful in Sequential operation.
THANK YOU FOR TODAY

You might also like