RS Logix 500 Counter won't reset

steelm

Member
Join Date
Jan 2004
Location
Ogden, UT
Posts
18
I am sure this has been covered, please direct if so.

Using the DN bit to energize an output then address a set of contacts the same as the output to reset the counter. Problem is the counter never resets to zero it goes to one instead. What causes this?
Thanks for your patience!
Matt
 
It does go to 0, but it is counting to 1 right away, too fast for you to see.

Take a look at your logic that enables the counter. Or post it here for us to look at too.


Edit:
This is very common. Most of the time I'd rather just add one to the preset and then ignore the 1 that it resets to. It's usually faster for me than to modify my CTU rung to try and stop it from happening. And unless it's a value that an Operator has to see on an HMI, then who cares if it's counting 1 to 5 instead of 0 to 4?
 
Last edited:
The counter internally performs a one-shot on its count input. Thus if the input changes from OFF to ON it counts up 1. Unfortunately one of the effects of resetting the counter is also to reset the memory bit of the input. So just after the reset the counter has, as a memory, that the count input was OFF. But now it gets back to processing the counter instruction again and it sees the count input on and so it counts up 1. If you can, add a NC of the input condition after the DN contact of the counter before resetting the counter.
 
That makes sense. The processor is working in milli-seconds and the action on the input is in tenths.

Thanks soo much for the accurate, quick responses. Take the rest of the day off!
 
Last edited:
Instead of the RES of the counter, you can - if you wish - just CLR the counter's .ACC, and OTU the .DN bit.

This will not reset the internal one-shot
 
Speed has nothing (well, almost nothing) to do with it.

The fact is that the counter is still enabled when you try to reset it.

I almost always pre-condition the 'bit that counts', creating a one-shot action in front of the counter, and adding the reverse sense of the reset action to the count oneshot bit (ANDED). Its a bit more cumbersome, but I've never had anyone say to me: "I don't understand what you're trying to do here." When you write 'verbose' logic, it nearly always explains itself.
[FLAME_SUIT=.on.]
 

Similar Topics

Tonight I'm contemplating using a technique I saw the other day while troubleshooting an installation of a legacy machine for a customer of mine...
Replies
9
Views
4,107
Rite now I am playing I do have a goal in mind but unsure how to get there. I have attached a Doc. Could anyone tell me why it doesn’t work. I am...
Replies
15
Views
4,184
Hello my name is Dorrance I am very new to plc programming. I am capable to make simple programs like inputs that trigger outputs but never worked...
Replies
11
Views
3,853
The counter instruction has an OV, a UN and a UA flag but they don't seem to do anything. For example, the OV (over flow flag) doesn't turn on...
Replies
5
Views
3,891
So possibly I am misunderstanding the definition of a count up on a false to true rung transition but I've got the following code (attached). You...
Replies
5
Views
3,330
Back
Top Bottom