0% found this document useful (0 votes)
306 views12 pages

Lab Exercise 8 - PLC Counters

This document describes a lab assignment for an Industrial Electronics course to implement up, down, and up-down counters using an S7-1200 PLC. The document includes introductions to counter fundamentals and the three types of counters (count up, count down, count up/down). It then outlines 6 activities for students to set up circuits for various counter applications on the PLC and answer related questions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
306 views12 pages

Lab Exercise 8 - PLC Counters

This document describes a lab assignment for an Industrial Electronics course to implement up, down, and up-down counters using an S7-1200 PLC. The document includes introductions to counter fundamentals and the three types of counters (count up, count down, count up/down). It then outlines 6 activities for students to set up circuits for various counter applications on the PLC and answer related questions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Department of Electrical Engineering

Sukkur IBA University

ESE-411: Industrial Electronics, Fall 2023

Lab 08: To implement Up, Down and Up-Down counters


using S7-1200 PLC

Instructor: Dr.-Ing. Kashif Hussain

Submission profile

Student’s Name: Wakeel Ahmed Submission date: 3/11/2023


CMS ID#:033-19-0026 Instructor’s signature:

Lab Report Rubrics Score


Criteria Poor Unsatisfactory Developing Satisfactory Exemplary

(0-20%) (21-40%) (41-60%) (61-80%) (81-100%)

Results

70%

Report
Structure

30%

Total
Performance Objectives
After attending this lab the student will be able to:
 Design the basic logic functions based on Counters
Tool:
1. Programmable Logic Controller (PLC) – S7 1200
2. Logosoft Comfort 8

Introduction
Counters Fundamentals
Siemens S7-1200 Counters are available in three different forms: count up (CTU), count down
(CTD), and count up and count down counter (CTUD). Table 1 shows the basic parameters for the
CTU, CTD, and CTUD. Operation of the three types of counters will be discussed in class. The
concepts covered in this section follows the Siemens notations but can be applied to other PLC
brands with minor modification

Activity 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. The counter block is shown in Fig. 1 with
appropriate tag names assigned. These tags are displayed between double quotes in the figure. All
counter required variables are displayed using the standard system labels, which start with the percent
(%) character. Counter preset input can be defined as a tag name or a constant value. Figure 2
provides the timing diagram for this timer.

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. 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.
Activity 2
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. As long as the LOAD input has signal state 1, the signal state at the CTD input
has no effect on the instruction. Figure 5 shows the CTD counter block, and Fig. 6 provides the
timing diagram. Figure 7 shows a ladder-logic diagram example for the CTD counter instruction.
The preceding example uses a motor to derive a conveyor system. The system requires that the
conveyor system shuts down once a preset value for rejected parts is reached. Part rejection is
initiated through a photoelectric inspection cell.

Count Up and Down Counters (CTUD)


The main function of the count up and down instruction is to count up or down the value at the
current count value, tag name COUNT_CV. If the signal state at the input count up (CU) tag named
PE1 transitions from 0 to 1, the current count value with tag name COUNT_CV is incremented. If
the signal state at the input count down (CD) tag named PE2 transitions from 0 to 1, the current
count value is decremented. When the signal at the LOAD input (LD) tag named LOAD changes
from 0 to 1, the count value (CV) is set to the value of the PV parameter. As long as the LOAD input
has signal state 1, the signal state at the CU and CD inputs has no effect on the instruction. The count
value is set to zero when the signal state at the R input tag named RESET changes from 0 to 1. As
long as the
R input has signal state 1, a change in the signal state of the CU, CD, and LOAD inputs has no effect
on the count up and down instruction. Figure 8 shows the CTUD instruction block and Fig. 9 provide
the timing diagram for the up and down counter for a PV value stored in a tag named COUNT_PRE.
Activity 3
Up Down Counter

Figure10 shows a ladder-logic diagram for the CTUD counter instruction. It has four inputs (PE1,
PE2, RESET, and LOAD), two outputs (COUNT_UP and COUNT_DOWN), and two parameters
(COUN_CV and COUNT_PV).
Activity 4
PLC counter program used to stop a motor from running after 10 operations.

Activity 5
Can-counting program that uses three up-counters.
Counter C5:2 counts the total number of cans coming off an assembly line for final packaging.
Each package must contain 10 parts. When 10 cans are detected, counter C5:1 sets bit B3:0/1 to initiate the
box closing sequence. Counter C5:3 counts the total number of packages filled in a day. (The maximum
number of packages per day is 300.) • A pushbutton is used to restart the total part and package count from
zero daily.

Activity 6
Program that provides continuous monitoring of items in process.
Exercise
Q1 Set up the circuit of activity 1 figure 4 on S7 1200 PLC and attach it.
Q2 Set up the circuit of activity 2 Figure 7 on S7 1200 PLC and attach it.
Q3 Set up the circuit of Activity 3 on S7 1200 PLC figure 10 and attach it.

Q4 Set up the circuit of Activity 4 on S7 1200 PLC figure 10 and attach it.
Q5 Set up the circuit of Activity 5 on S7 1200 PLC figure 10 and attach it.
Q6. Set up the circuit of Activity 6 on S7 1200 PLC figure 10 and attach it.

Q7. Parking lot has two momentary action sensors to count the number of cars entering or exiting
the garage. One sensor is placed at the entrance, and the other is placed at the exit. Two
messages should be displayed to customers indicating the status of the parking lot (“Parking
is Full” or “Parking is Empty”). Parking full is simulated by PL1, and parking empty is
represented by PL2. Write and document a ladder-logic program to implement this process.

Q8. Draw ladder diagram for the following: Develop the ladder logic that will turn on a light,
after switch A has been closed 10 times. Push button B will reset the counters.

Q9. What is function of LD in down counter?

LD stands for “Load” which is used to load the value from which the down counter should
start, and decreases with each pulse.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy