Question about S7 Counter

kallileo

Lifetime Supporting Member
Join Date
Jun 2008
Location
Thessaloniki, Macedonia, Hellas
Posts
353
I can't figure out how S_CU counter works in S7.

countero.jpg


I want to turn the ouput Q On when the counter has counted 5 pulses on input I0.0.
What I get when I simulate this program is that after the first pulse the output turns On.
Also what is the difference between this S_CU and CU counter that also is available.

Any help will be appreciated...
Thanks
 
Already did that.
It says "The signal state at output Q is "1" if the count is greater than zero and "0" if the count is equal to zero."
After the first pulse Q just turns On. Shouldn't Q be off until the 5th pulse?
 
Already did that.
It says "The signal state at output Q is "1" if the count is greater than zero and "0" if the count is equal to zero."
After the first pulse Q just turns On. Shouldn't Q be off until the 5th pulse?

There you answered your own question. Look for what PV, S and R do. It will clear it for you.
 
Dunno what all you know about Siemens but when I was learning S7 ten years ago a lightbulb went off when I figured out you can write your own Functions.

Frustrated with Siemens counters (BCD output?), I stopped using them. In just a few minutes I wrote a little function (FC) to do the same thing. I wanted a counter that had a preset, accumulated value, countdown until done, and a done bit. This can all be done with ADD Integer and comparisons within the FC. Once your FC is created you call it, pass the parameters in and get the parameters out. You could use an FB instead of an FC, the choice is yours. Hope this helps, just wanted to open the door if you didn't know it existed.
 
"o what is the difference between this S_CU and CU counter that also is available."

its the same thing. Just a few unwanted input and output isn't visible.
When you use CU just write its name and it will countt until 999
if you want to reset, use reset logic.

I suggest that when you use S_CU don't use Set and PV Value. Just use reset when you reached your desired value.(with any comparator's output)
 
use a memory word value (mw0) in cv of the counter and the connect a greater than equals to (GE_I) comparetor with the Q bit of counter. Copy the mw value from cv of counter and placed it into IN1 of comparetor and put the counting value without C# in IN2 of comparetor and connect the output with the output of comparetor.
I think it will help u
 
hi kallileo i have done a method for counter as described by paul B but my problem is i cant resest the counter or my memory word value where i have stored my counter counted value plz help me
 

Similar Topics

Hello! I have a question about a routine I found on one of our box palletizing machines. I've attached the 3 rungs that I have the question...
Replies
12
Views
2,325
Hi all, I'm converting a S7-200 program to S7-300. There's a counter being addressed as an open contact such as.... C1 --| |--- In...
Replies
2
Views
1,405
I am having an issue with a little Micrologix program. Counter 1 increments each time item passes sensor on input 0 When Counter 1 increments to...
Replies
4
Views
1,604
Hi, I'm using a Micrologix 1400 PLC as a dual counter and oil monitor. I've included the program. I need to know why the HSC:0 isn't accumulating...
Replies
2
Views
1,712
I'm translating a printout of a program written for an F1/F2 series Mitsubishi PLC to a Micrologix. I've stumbled upon something that I can't...
Replies
4
Views
3,754
Back
Top Bottom