UNIT LLL PLC

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

UNIT lll

PLC REGISTERS
• Characteristics of registers
• Module addressing
• Holding registers
• Input & output registers
PLC FUNCTIONS
• Timer functions & industrial applications
• Counter functions & industrial applications
• Arithmetic functions
• Number comparison functions
• Number conversion function
Characteristics of registers:
Within the plc cpu, registers are found in two locations. The
microprocessor has internal register, most of which are not directly accessible by
the user. These registers (4, 8, 16 or 32 bits wide, depending on the
microprocessor) help the control and arithmetic and logical units within the
processor to carry out their tasks. Accumulator registers, data registers index
registers, condition code registers, scratch pad registers and instruction registers.
All work to temporarily store data, which in turn is used to facilitate the carrying
out of programmed function.
In addition to these registers, the CPU’s and RAM also contains slots
that are designated to hold variable information. These locations, or addresses,
become external registers.
Each bit location in a registers contains, of course, either a 1 or0.
Depending on your plc capabilities, you may choose to print registers values
based on one or more different numbering systems. For example, one model to
allow to choose between 1- Decimal, 2-Binary, 3-Hex, or 4-ASCII. Other
possibilities are octal and special codes unique to the system being used. Still
other PLCs are confined to displaying or printing in only one numbering system,
usually the decimal system.
Registers are usually designated using prefixes followed by numbers, as is the
case in this chapter .HR256 represents holding registers 256; OG2 represents
output group registers number 2. In other systems, a certain numerical series of
addresses may be assigned to a specific task or function.

Module addressing:
Before we move on to register basics, this is, perhaps, a good time to revisit a
topic briefly discussed in chapter 1,PLC input and output modules. Specifically, we
want to examine module I/O addressing.
You will recall that I/O modules, along with the processor module and
power supply. Sit in chassis, a physical hardware assembly. The I/O module are
actually placed in an I/O racks. Each I/O module in turn consists of I/O groups
made up of a set of terminals. The terminal used for making field warning
connections. In sum, we have a PLC with I/O modules, consisting of groups of
terminals.
The location of an input or output terminal, within a rack will determine a
device must have an address. Each input and output device must have an address.
As an example of an I/O terminal addressing scheme, let’s look at what
Allen Bradley does with its PLC 5. The addressing format shown in fig 1.
The scheme consists of a five-level hierarchy starting at the top with a file
type and descending to a terminal number. Specifically:
• A file type designates an input or output module (I-input: O-output).
• A file no. specifics which particular I/O module, input or output
• A rack no. determines which rack the module sit in.
• A group is a set of terminals within a rack. Typically there would be 8
groups in a rack (0-7)
• The terminal No. is the bit address for a particular terminal, input or
output
In fig 1b, we show two examples of the addressing format. In example
No.1, we have an input module (file type), with a file No.2, in rack 3,group 6,
having a terminal bit address of 28.
In example No2, we have an output module (file type), with a file No.0, in
rack 4, group 3, having a terminal bit address of 5.
Of course, this Allen-Bradley addressing scheme in only one of many types.
None the less, it is indicative of I/O module addressing method used throughout
the industry.

Handling registers:
A holding, or working, register (HR) “holds” the contents of a calculations,
athematic or logic. conceptually, it is in the “middle” of the CPU, as shown in
fig 2.
Because in many PLC’s ,particularly smaller ones the holding register is not
directly accessible to inputs or output, input and output registers (single or group)
interface the holding register contents to the outside world . signal data from a
specific input device is first “deposited”, in the form of 0s and 1s, in am input
register. It may then be manipulated by the

Fig 1
Microprocessor and the result sent to a holding register. Conversely, before the
contacts of the holding register can affect the output device, they are transferred
to an output register. The output register’s 0s and 1s “drive” output interface
devices such as opt isolators.
To illustrate holding register use, we can look briefly at their function in
arithmetic, timer and counter operations. Keep in mind though, that not only are
these operations covered in greater detail in later chapters, but holding registers
are used in numerous other functions covered.
In arithmetic operations, a holding register might contain the first operand;
another holding register, the second operand ; and a final holding register, the
destination of the mathematical manipulations in fig 8-3.
In the timer functions the present time value would be placed ina constant
or designated register. The holding register, of course, is the register in which the
count take place.

Input registers:
The input register has basically the same characteristics as the holding,
except that it is readily accessible to the input module’s terminals or ports.
The number of input registers in a PLC is normally one –tenth that of
holding registers.
b counter
The input group register (IG) is somewhat like the input register. It differs inthat
each one of the individual 16 bits is directly accessible from one input port. One
input group register receives data from 16 consecutive input ports (terminals). Fig
8-5 illustrates how this IG system works. The advantage of the IG system is that
only one register is required to service 16 inputs. Without the input group system,
you would use up more compute memory space to rum your programs.
The input module port (terminal)corresponds to a single input group
register bit. Each IG register status controls one bits status. When a port is enable,
or on,it creates a 1 in the corresponding bit slot. If the port is off if produces a 0 in
the corresponding bit slot.
Output Register:
Like the input register, the output register has the same basic
characteristics as the holding register. The output register differs from the holding
register, however, in that it is readily accessible to the output module’s terminals
and ports. The number of output registers is normally equal to the number of
input registers.

You might also like