0% found this document useful (0 votes)
9 views32 pages

ECE 524-Week 2

The document provides an overview of PLC (Programmable Logic Controller) instructions, including digital and ladder logic equivalents, logical, arithmetic, and data handling instructions, as well as timer and counter instructions. It explains various instructions such as Examine if Closed (XIC), Examine if Open (XIO), and energize output coil (OTE), along with their applications in controlling devices. Additionally, it covers timer functions like Timer-On-Delay (TON) and counter functions like Up-Counter (CTU) and Down-Counter (CTD).

Uploaded by

Mojisola Jimoh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views32 pages

ECE 524-Week 2

The document provides an overview of PLC (Programmable Logic Controller) instructions, including digital and ladder logic equivalents, logical, arithmetic, and data handling instructions, as well as timer and counter instructions. It explains various instructions such as Examine if Closed (XIC), Examine if Open (XIO), and energize output coil (OTE), along with their applications in controlling devices. Additionally, it covers timer functions like Timer-On-Delay (TON) and counter functions like Up-Counter (CTU) and Down-Counter (CTD).

Uploaded by

Mojisola Jimoh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

1.

Digital and Ladder Logic Equivalents


2. PLC Instructions (Logical, Arithmetic, Data
Handling)
3. Timer Instructions (TON, TOF, RTO)
4. Counter Instructions (CTU, CTD, RES)
1. Digital and Ladder Logic Equivalents
1. Digital and Ladder Logic Equivalents
1. Digital and Ladder Logic Equivalents
2. PLC Instructions: Relay Logic
➢ In ladder logic programming, input conditions are
represented by contact symbols, and output
instructions by coil symbols.
➢ Examine—On or Examine if Closed (XIC) is a
single-input condition instruction that simulates a
NO contact.
➢ A True rung condition is established when the
contact is closed (bit 1).
➢ XIC is typically tied to field devices that send an
ON (1 or true) signal to the PLC input module,
such as NO push buttons, proximity sensors, and
switches.
2. PLC Instructions: Relay Logic
➢ Examine—Off or Examine if Open (XIO) is a
single-input condition instruction that simulates
an NC contact
➢ The rung evaluates as True when the memory bit
associated with the XIO instruction is 0 (OFF),
and it evaluates as False when the bit is 1 (ON).
➢ XIO is typically tied to field devices that send an
OFF (0 or false) signal to the PLC input module,
such as NC push buttons, temperature sensors,
and limit switches.
2. PLC Instructions: Relay Logic
➢ Energise output coil (OTE) instruction simulates
or energises a coil or output field devices.
➢ It is performed only if the input instruction (s)
preceding it provide a logical continuity part.
➢ The output instruction resets the memory bit to 0
when the rung condition is False
➢ OTE field devices include lamp, motor starters,
and relay coils
2. PLC Instructions: Relay Logic
➢ Negated Output (NEG) instruction flips the
logic state; True becomes False, and False
becomes True.
➢ A NEG XIC instruction, the rung is True when the
input bit is 0 (OFF), i.e., the output turns ON
when the input is NOT ON.
➢ NEG is used by devices that are energized or
activated when a rung evaluates as FALSE,
usually through inverted logic
2. PLC Instructions: Relay Logic
➢ The Latch output (OTL) instruction is a retentive
output action instruction.
➢ When the rung is TRUE, it sets the bit to 1 or
turns ON and holds an output until a separate
Unlatch.
➢ It's used when a device needs to remain ON even
after the triggering condition is no longer true
➢ OTL instruction field devices include valve,
alarms and motors
2. PLC Instructions: Relay Logic
➢ The Unlatch output (OTU) instruction is used
to turn OFF (unlatch, reset ) a bit in the memory
that was previously turned ON using OTL.
➢ OTU is typically paired with OTL, where OTL
sets the bit HIGH and OTU clears it.
2. PLC Instructions: Relay Logic
2. PLC Instructions: Exercise

1. Explain the logic conditions required for


energizing the SOL (Y).
2. If LS1 is not actuated, what is the status of SOL?
3. What happens to SOL when CR2 is energized?
2. PLC Instructions: Arithmetic
➢ PLC performs the four basic mathematical
operations: addition, subtraction, multiplication,
and division.
➢ It also performs advanced functions like square
root, absolute value, and trigonometric functions.
➢ Mathematical instructions are used for functions
like combining parts counts, subtracting defective
parts, calculating run rates, logging, or counting
products
2. PLC Instructions: Arithmetic
2. PLC Instructions: Data Handling
➢ Data handling instructions enable PLC to use
multi-bit data to control outputs rather than only
one bit.
➢ Data handling is divided into three categories:
data transfer, data conversion, and data compare.
➢ Data transfer moves contents stored in one
memory register to another memory location.
➢ Data transfer function uses a MOVE (MOV)
instruction for the data transfer operation.
2. PLC Instructions: Data Handling
➢ Data transfer instruction is used with presetting
numbers, comparing data, or performing an
arithmetic operation.
➢ Masked Move (MVM) moves data from a source
to a selected portion of the destination.
➢ Clear (CLR) instruction sets the destination value
of a word to zero.
➢ Jump (JMP) instruction is used to skip a portion
of the ladder program.
2. PLC Instructions: Data Handling
2. PLC Instructions: Data Handling
➢ Data conversion enables
conversions between binary and
equivalent values.
➢ The Convert to BCD (TOD)
changes a pure 16-bit binary
number into an equivalent
numerical BCD number in four
separate groups of four bits.
➢ The Convert from BCD (FRD)
changes four separate groups of
BCD values into an equivalent
binary value consisting of 16 bits.
2. PLC Instructions: Data Handling
➢ Data compare instruction instructs the processor to
compare the numerical contents of two registers and
to make decisions based on their values and the type
of instructions used.
➢ These instructions are used as inputs on a rung.
➢ Compare Equal (EQU) compares two numerical
values. Source A must be a word address, and source
B can be a word address or a program constant.
➢ Others are Compare Not Equal (NEQ), Compare
Less Than (LES), Compare Less Than or Equal
(LEQ), Compare Greater Than (GRT), Compare
Greater Than or Equal (GEQ).
2. PLC Instructions: Data Handling
23. Timer Instructions
➢ Timers are output instructions that are internal to
the PLC.
➢ They provide timed control of devices that they
activate or deactivate, such as delaying an action,
causing an operation to run for a predetermined
period, etc.
➢ A timer is activated by a change in the logic
continuity of its rung.
3. Timer Instructions
3. Timer Instructions
➢ The timer has the following structure:
▪ Timer Address: the name or number of the timer
you are using.
▪ Accumulated value (ACC): shows how much time
has already been counted.
▪ Preset Value (PRE): shows the time duration you
want the timer to count up to (before setting the
DN bit).
▪ Status bit (Enable bit(EN) showing that the timer is
active, Timer timing (TT) showing that the timer is
currently running, and Done (DN) showing that
the timer has reached the preset).
3. Timer Instructions
➢ Timer-On-Delay (TON): delays in turning ON an
output.
▪ Begins timing when the rung becomes true.
▪ The timer causes the ACC value to increase and set
EN and TT.
▪ When accumulated time reaches the preset, the DN
bit turns on.
▪ If rung goes false, it resets automatically.
3. Timer Instructions
➢ Timer-Off-Delay (TOF): delays in turning OFF
an output.
▪ Starts timing when the rung becomes false.
▪ The timer sets EN to 0 and sets TT which causes
the ACC to increase.
▪ When ACC = PR, timer stops timing and the
output energises as DN and TT resets
▪ Output stays ON during the delay, then turns
OFF after time is done.
3. Timer Instructions
➢ Retentive Timer-On-Delay (RTO): similar to TON
instruction except that instead of losing its
accumulated value when the rung condition is
False, it is retained.
4. Counter Instructions
➢ Counters are output instructions internal to the
PLC.
➢ A counter simply counts the number of events that
occur, then stores and displays the accumulated
value.
▪ The counter has a structure that includes a symbol
and an address, an accumulated value, and a
preset value
▪ Counter instruction has 5 Status bits.
a. Up-Counter Enable bit (CU) is set when the rung
condition of an up counter is True and resets if
otherwise
4. Counter Instructions
a. Down-Counter Enable bit (CD) sets a down
counter anytime the rung condition is True.
b. Count Complete bit (DN) sets when ACC = PRE
c. Overflow bit (OV) sets when ACC is greater than
maximum count of 32,767.
d. Underflow bit (UV) sets when ACC is less than
maximum count of -32,767.
4. Counter Instructions
➢ Up counter (CTU) instruction increases by one
each time a counted event occurs
➢ The number of events is recorded in the ACC.
➢ When the ACC = PRE, DN is set.
➢ CD will remain set if the counting continues
beyond the PRE value.
➢ If the count then goes beyond 32,767, the OV bit
then sets.
4. Counter Instructions
➢ Down counter (CTU) instruction decreases by one
each time a counted event occurs
➢ The number of events is recorded in the ACC.
➢ DN is set until the ACC value goes below the PRE
value
➢ If the count goes below -32,767, the UN bit then
sets.
➢ Counter-Reset (RES) instruction clears the
accumulated value of up and down-counters to
zero.
Exercises
Recommended Text

1. Industrial Control Electronics: Devices, Systems,


and Applications by Terry Bartelt. Thomson
Delmar Learning

You might also like