0% found this document useful (0 votes)
81 views6 pages

Counter: Siemens

This document provides information about counters in Siemens SIMATIC S7 PLCs. It describes how to count up, count down, preset the counter value, and reset the counter. It also shows ladder logic and function block diagrams for counters. Additionally, it discusses comparison operations that can be used with counters and provides an exercise to write a program to control counting between 0 and 9 using an input and counter.

Uploaded by

jhuskanovic
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
Download as ppt, pdf, or txt
0% found this document useful (0 votes)
81 views6 pages

Counter: Siemens

This document provides information about counters in Siemens SIMATIC S7 PLCs. It describes how to count up, count down, preset the counter value, and reset the counter. It also shows ladder logic and function block diagrams for counters. Additionally, it discusses comparison operations that can be used with counters and provides an exercise to write a program to control counting between 0 and 9 using an input and counter.

Uploaded by

jhuskanovic
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1/ 6

SIEMENS

COUNTER

SIEMENS
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

1/11

November 21, 2013

SIEMENS

Objectives

- Know How Counter Works -How To Use Comparison Operation With Counter.

SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

2/11

November 21, 2013

SIEMENS

Counter
Count Up Count Down Set Counter Preset Value Reset Counter
LAD Diagram

I 0.0
CU I 0.1 CD I 0.2 S C#50 I 0.3 R PV

C0 S_CUD Q Q CV CV_BCD

Q 0.0

MW 0

C0 S_CUD I 0.0 CU CD S PV R A CU A CD A L S A R L T A = CV CV_BCD Q Q I0.0 C0 I0.1 C0 I0.2 C#50 C0 I0.3 C0 C0 MW4 C0 Q0.0 Q 0.0 = MW 0

CV/CV_BCD Output

FBD Diagram

I 0.1 I 0.2 C#50 I 0.3

STL

SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

3/11

November 21, 2013

SIEMENS

Comparison Operations
I0.0

CMP ==I

Q 0.0

You can use comparison instructions LAD Diagram to compare numerical values:
MW0

I D R

Compare integers Compare integers Compare floating-point numbers

MW2

IN1 IN2

CMP ==I

The values at inputs IN1 and IN2 are compared FBD Diagram == IN1 is equal to IN2 <> IN1 is not equal to IN2 > IN1 is greater than IN2 < IN1 is less than IN2 >= IN1 is greater than or equal to IN2 <= IN1 is less than or equal to IN2.

MW0 MW2

IN1 IN2 & I0.0 A A( L L ==I ) = I0.0 MW0 MW2

Q0.0 =

STL

Q0.0

SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

4/11

November 21, 2013

SIEMENS

Exercise:
1- Write a PLC program to control the counting between zero & 9,

by using one input & one counter.

count up count down

0 9 9 0

SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

5/11

November 21, 2013

SIEMENS

Answer of Exercise 1:

SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

6/11

November 21, 2013

You might also like