Plc counter

jreyesm1988

Member
Join Date
Apr 2016
Location
Miami
Posts
19
Hello, one question:( Allen Bradley)
Why a counter keep counting in a subroutine without a false to true transition every time the subroutine is executed
 
Last edited:
Because that is what a counter does: every cycle where the input is high is counted.

If your intention is to count how often the signal has gone from a low to a high signal, then place a rising trigger in front of the counter. Thus you will count a longer high signal only once.
 
Because that is what a counter does: every cycle where the input is high is counted.

That is incorrect, a counter has to see a "false to true" transition on its "Enable-In" to make it count.

If jreyesm1988's counter is counting every time the subroutine is scanned, my guess is that the counter exists elsewhere in his logic, on a rung that is false, which resets its .CU or .CD bit.

jreyesm1988, do a cross-reference on the counter and check that you haven't used it more than once. Also check that you are not unlatching the .CU or .CD bit elsewhere.
 
Because that is what a counter does: every cycle where the input is high is counted.

If your intention is to count how often the signal has gone from a low to a high signal, then place a rising trigger in front of the counter. Thus you will count a longer high signal only once.

That's not correct: the CTU and CTD instructions in an Allen-Bradley PLC are edge-triggered (that is, they must see a false-to-true transition to execute a single count-up or count-down).

Of course, the OP didn't necessarily specify that the CTU or CTD instructions were in use; it's possible that the program uses an ADD instruction to count. In this case, what Toine says is correct; the ADD instruction will perform the addition operation as long as the rung-in condition is true, each and every scan.

If the program is using CTU or CTD instructions, and still counting every scan, do a cross reference on the counter itself. When the counter counts up, it sets the .CU bit to be true, as a kind of internal one-shot. The next scan, the CTU will see that its .CU bit is already set, so it will not count up again. Once the rung-in condition goes false, the .CU bit will be reset, and then the next time the rung-in condition is true, the counter will count once more.

The upshot of all of this, is that if you unlatch the .CU bit externally, the counter will count every scan.

Also, while you are cross referencing your counter, check to see if anything is writing to your .ACC value. It may be that the counter itself is not incrementing, but that something is writing to it's count tally somewhere else.

(edit: you win this round, daba... :D )
 

Similar Topics

Does anyone know of a counter block (either PLC or PAC) that allows configuration of the input signal, such that it can be set to count up/down on...
Replies
11
Views
717
Hello I have a AB Compact logic 1769-L32E controller. I'm wanting to reset a counter at the end of each month. Since the months have different...
Replies
34
Views
9,503
HELLO i am working on a logic in which i have to record number of hours a DI bit is enabled and record it to vijeo citect 7.4. in simple words i...
Replies
3
Views
2,274
Hi there! I'm using mitsubishi plc for some project controling. I try to use high speed counter C242 to reading an speed machine. I use two...
Replies
0
Views
1,396
Hello, I want to understand what each terminal does on the Embedded High Speed Counter on the 1769-L24ER-QBFC1B PLC? I read the manual, but I...
Replies
2
Views
2,969
Back
Top Bottom