Need help with counter in Siemens S7-300

lostpatrol

Guest
L
Ok, normally when one does a counter, a done flag goes on when a count is done, either up counter or down counter...

In Siemens S_CD or S_CU, the output flag, Q, goes true when it is NOT 0...and when the counter is done, then the Q goes false.

Is there a way I can make it the opposite? Q goes false when still counting and when done counting, Q goes true?

TIA!
 
Not knowing Siemens I'm only guessing, but you probably can't change the way a functon block works.

But you are looking for a bit that is TRUE when Q is FALSE, and FALSE when Q is TRUE, is that it?

That doesn't sound like a very hard rung to create, now does it?
 
I can reverse the logic using the output flag...but from the looks of it...dont' think I can change the actual function of the counter in Siemens...
 
What that means is that as long as S_CU or S_CD is counting then Q is true. You can always use reverse logic of Q but you arent doing ladder are you? These are FBD instrucutions, therefore if you need it to do something at a certain point than you probably need to use the Compare instruction(or similar) to monitor the values in the counter and create your action from it.

Now on the other hand there is SFB0 "CTU" that goes to 1 (true) when CV equal to or greater than PV. This is part of the IEC timers and counters. Look on Page 345 Chapter 22.4S7-300 Reference Manual
 
S7 counters

Abandon the stock counter and write your own in an FC or FB (I like the FB but if you use a lot of them they eat up data blocks the FC would just use up M-Bytes or words). You can one shot the input to the counter or manufacture the one shot within. We like this better than the stock counters because it gives us better control. I can send you one if you like.

The Siemens counters can be a pain to use.

Lenny
 
For someone who is used to Siemens it's very easy: you have to change your way of thinking (at least concerning counters). With the set input you load a preset value to the counter. You count down and when the output goes to zero, then you are done. It's like using inverse logic with some older hardware logic components. When I first used these I also had problems figuring it out.

If you're used to it, it's always easy!
 
For someone who is used to Siemens it's very easy: you have to change your way of thinking (at least concerning counters). With the set input you load a preset value to the counter. You count down and when the output goes to zero, then you are done. It's like using inverse logic with some older hardware logic components. When I first used these I also had problems figuring it out.

If you're used to it, it's always easy!

I like the way you explained. Appreciated!
 

Similar Topics

I am attempting to use a Mitutoyo SAM (Single Axis Multiplier)-15 connected to a Mitutoyo linear scale (AT102) with an Allen Bradley 1746-HSCE2...
Replies
4
Views
24,184
i have a conveyor system where output is being counted. Plc sends a pulse to a digital display counter(which can count only 1 count per pulse)...
Replies
7
Views
3,498
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
340
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
166
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
70
Back
Top Bottom