0% found this document useful (0 votes)
9 views

plc repoert

PLC Logic Operations: Contact and coil programming, Logical operations (AND, OR, NOT, XOR Etc) in ladder logic, Practical programming examples and exercises.

Uploaded by

NEHA M
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 views

plc repoert

PLC Logic Operations: Contact and coil programming, Logical operations (AND, OR, NOT, XOR Etc) in ladder logic, Practical programming examples and exercises.

Uploaded by

NEHA M
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/ 4

INTRODUCTION TO PLC 2024-25

PLC Counter Functions


→ Basic counter operations, up/down counters
1. Count Up Counters (CTU):
➢ The count up counter’s main function is to increment the current value each time the
input to the counter transitions from 0 to 1.
➢ If the current count value (CV) is equal to the preset value (PV), the output Q is set.
➢ When reset input (R) is TRUE, the accumulated value resets to 0.
➢ Counter preset input can be defined as a tag name or a constant value.
➢ All counter-required variables are displayed using the standard system labels, which
start with the percent (%) character.

Counter block CTU timing diagram with PV = 4

→ Ladder Diagram Example for Count Up Counters


➢ The first network assumes a normally open START push button (I0.0), a normally closed
STOP push button (I0.1), an AUTO selector switch (I0.2), motor output (Q0.0), and an
OFF-DELAY timer with a preset time (PT) of 3 seconds.
➢ The second network uses an ON-DELAY timer with a preset time (PT) of 2 seconds,
count up instruction with preset value (PV) of 100, positive edge instruction (M1.2), and
an output pilot light (Q0.1).
➢ The START push button runs the motor immediately, which drives a conveyor system.
Once the conveyor system runs, an input is received from the motor magnetic starter
indicating successful system start (MOTOR_RUN).
➢ The motor runs for the duration to allow a preset number of parts to be transported over
the conveyor system, which is set to 100 in our case.

Dept of RO & AI, BTI, Bengaluru 1


INTRODUCTION TO PLC 2024-25

CTU ladder-logic diagram

• The first network initially is FALSE during the first scan because the STOP push button
(I0.1) is wired high. Also, the START push button is FALSE because this switch is not
pressed (normally open push button), and the AUTO mode (I0.2) is set.
• Once the START push button is pressed, I0.0 becomes TRUE, Timer 0 output will be
TRUE, making Q0.0 TRUE (the output to Motor 1) and causing Motor 1 to run. During
the next scan, Q0.0 will latch around the START push button and maintains the first
network TRUE.
• The second network has I0.4 as an input, which becomes TRUE once the motor starts
running and enables the CTU instruction.
• When the motor running input (MOTOR_RUN) is set, indicating that the conveyor is
moving, a photoelectric cell will issue a positive narrow pulse as a part crosses its beam,
which causes the CTU current value (CV) to increment.
• Once the counter preset value (PV) equals the current value (CV), the counter output Q is
set to TRUE and starts Timer 1. After 2 seconds of delay, the pilot light (PL) will be set,
indicating the end of the cycle. The 2 seconds allow the last part to cross the counting
station.
• Once the pilot light is set, the counter count value (CV) resets to 0 through the positive-
edge counter instruction rest input. The TOF timer in the first network will lose power, and
Timer 0 will start timing. Three seconds later, MOTOR_OUT will be FALSE, and motor
will stop running. The 3 seconds allow the last part to arrive at the end of the conveyor
line.
• A solenoid, which is not shown, stops parts from entering the counting station while the
conveyor runs during the 5-second delay. Notice that only one timer is needed for this
implementation. Two different timers were used for the demonstration of TON and TOF
instructions.

Dept of RO & AI, BTI, Bengaluru 2


INTRODUCTION TO PLC 2024-25

→ Count Down Counters (CTD)


➢ The countdown counter’s main function is to decrement the current value (CV) each time
the input to the counter transitions from 0 to 1.
➢ If the current value is equal to or less than 0, the counter output Q is set.
➢ The value at the CV is set to the value of the PV parameter when the signal state at the LD
input changes to 1.

CTD counter block CTD timing diagram with PV = 3

→ Ladder Diagram Example for Count Down Counters


➢ Ladder-logic diagram example for the CTD counters instruction.
➢ This logic diagram assumes a normally open START push button, a normally closed
STOP push button, a photoelectric cell (PE), Motor 1 running input (MOTOR1_RUN), a
counter preset value (PV) of 10, output Motor 1 (Q0.0), and output Pilot light 1 (Q0.4).
➢ The ladder diagram consists of two networks.
➢ This example and the preceding one assume that the motor running input signal is
realized immediately after the motor is commanded to start and before the next scan.
Typically, this indication is delayed for several scan times.

• 10.1 is TRUE during the first scan because the STOP push button is wired high. Also, the
START push button is FALSE because this switch is normally open and not pressed.

Dept of RO & AI, BTI, Bengaluru 3


INTRODUCTION TO PLC 2024-25

• Once the START push button is pressed, I0.0 becomes TRUE; this, in turn, makes Q0.0
(MOTOR1) TRUE.
• The next scan, Q0.0, will latch around the START push button and maintain Network 1
TRUE status.
• When Motor 1 run input, tag name MOTOR_RUN, is set, the PE will generate a positive
pulse for each rejected part.
• The counter (CTD) will decrement the CV, tag name CTD_CV, every time PE transitions
from 0 to 1.
• Once the CV is 0, Pilot light 1 will turn ON, indicating that 10 parts are rejected.
• This also will stop the motor and the conveyor system.
• The same sequence can be restarted through the START push button. The counter preset
value is maintained at the initial assignment.

Dept of RO & AI, BTI, Bengaluru 4

You might also like