TConnolly
Lifetime Supporting Member
thanks Ron.. I shall not reset my counter in the future.. lol one line of code un-needed
Caution! You might want to reset it. When you have a power failure (or go to run from program) the counter will pick up right where it left off. If Counter.ACC/0 was on when power went off, it will be on when power returns - which might be a bad thing in some applications. If it is then you want to reset the counter using the first scan bit. You need to determine for yourself its suitability to the application.
Likewise, a flip flop like the one Eric linked to, will always come back on in the off state when power returns, and there might just be an application where that is not what you want, where what you really want is to return to the last state.
Last edited: