0% found this document useful (0 votes)
91 views3 pages

PLC Laboratory Activity 2

This document discusses using counters in a PLC. It describes three types of counters: count up counters, count down counters, and count up/down counters. It explains how each type of counter operates and provides an example process to control tank level and mixing using counters and timers. The process involves opening and closing valves and running mixing motors when tank levels pass certain points, repeating for two cycles before stopping.

Uploaded by

Kate Alindajao
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)
91 views3 pages

PLC Laboratory Activity 2

This document discusses using counters in a PLC. It describes three types of counters: count up counters, count down counters, and count up/down counters. It explains how each type of counter operates and provides an example process to control tank level and mixing using counters and timers. The process involves opening and closing valves and running mixing motors when tank levels pass certain points, repeating for two cycles before stopping.

Uploaded by

Kate Alindajao
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/ 3

PLC Laboratory Activity 2

Counters

Objectives:

 To study the operation of different types of counters.


 To use the PLC counters and timers in a process control.

How to use counters:

Count Up Counter

The Count Up Counter (CTU) counts up from the current value each time the count up (CU)
input makes the transition from off to on. When the current value Cxx is greater than or equal
to the preset value PV, the counter bit Cxx turns on. The counter is reset when the Reset (R)
input turns on, or when the Reset instruction is executed. The counter stops counting when it
reaches the maximum value (32,767).

Count Down Counter

The Count Down instruction (CTD) counts down from the current value of that counter each
time the count down (CD) input makes the transition from off to on. When the current value
Cxx is equal to 0, the counter bit Cxx turns on. The counter resets the counter bit Cxx and loads
the current value with the preset value PV when the load input LD turns on. The counter stops
upon reaching zero, and the counter bit Cxx turns on.

Count Up Counter (CTU) Count Down Counter (CTD) Count Up/Down Counter (CTUD)

Count Up/Down Counter

The Count Up/Down instruction (CTUD) counts up each time the count up (CU) input makes the
transition from off to on, and counts down each time the count down (CD) input makes the
transition from off to on. The current value Cxx of the counter maintains the current count. The
preset value PV is compared to the current value each time the counter instruction is executed.
Upon reaching maximum value (32,767), the next rising edge at the count up input causes the
current count to wrap around to the minimum value (-32,768). On reaching the minimum value
(-32,768), the next rising edge at the count down input causes the current count to wrap
around to the maximum value (32,767).

When the current value Cxx is greater than or equal to the preset value PV, the counter bit Cxx
turns on. Otherwise, the counter bit turns off. The counter is reset when the Reset (R) input
turns on, or when the Reset instruction is executed. The CTUD counter stops counting when it
reaches PV.

Table 1. Valid Operands for the SIMATIC Counter Instructions

Inputs/Outputs Data Types Operands


Cxx WORD Constant (C0 to C255)
CU, CD, LD, R BOOL I, Q, V, M, SM, S, T, C, L, Power Flow
PV INT IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AIW,
*VD, *LD, *AC, Constant

Since there is one current value for each counter, do not assign the same number to more than
one counter. (Up Counters, Up/Down Counters, and Down counters with the same number
access the same current value.) When you reset a counter using the Reset instruction, the
counter bit is reset and the counter current value is set to zero. Use the counter number to
reference both the current value and the counter bit of that counter.

Experimental Work

A PLC-controlled system operates as follows. If the Start button is pressed, MV1 will be opened
and dye starts to fill the tank. At the same time mixing-motor begins to run. As the level of the
dye passes TBL2 and reaches to TBL1, MV1 will be closed and mixing-motor will stop. Then
MV2 will be opened and dye begins to run out of the container. After the level of the dye
reaches to the below of TBL2, MV2 will be closed. This process is repeated for two (2) times,
then the system will stop.

We can observe the stopping of the system with the lamp and the buzzer.

After the system stops, buzzer will continue to run for 2 sec and then it stops. But the lamp
continues to light until the reset button is pressed. When the reset button is pressed, the
system will be ready to begin the same process again. Construct a LAD for this system.

You might also like