PLC counter block with configurable edge detection

dhancock

Supporting Member
Join Date
Dec 2023
Location
Atlanta
Posts
3
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 either a rising edge or a falling edge?
 
Why does counting on a falling edge matter? Particularly if it doesn't need the rising edge being counted?



I'd imagine some encoder cards to be smart enough to do stuff like that... or you can program it.
 
Easy enough to roll your own as long as the PLC supports falling edge contacts.


Every PLC supports it. You can use old fashioned way without R_trig and F_trig blocks on STL or ladder with temperary saving status of input and conparing with inverted bit one scan before.
 
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 either a rising edge or a falling edge?

Here (Rockwell Logix).

In RSLogix 500 a pair of CTU/CTD blocks (here) could be used with the same C5:n counter object.

Also, it is not complicated to roll one's own:
Code:
   Inp     Mem
---]/[-----] [----[ADD count 1 => count]------

   Inp     Mem
---] [--+--]/[----[SUB count 1 => count]---+--
        |                                  |
        |  Mem                             |
        +--( )-----------------------------+
Which could be encapsulated in an AOI (or equivalent for whatever vendor is in use).

It may also need supporting rungs:
- to ensure the count is not changed on the first scan at entry to RUN mode;
- to reset the count to an initial value.
 
Thank all who responded, but I am actually looking for a counter block that will allow the selection of a rising/falling edge as a trigger. Not for programming but for research that I am doing on a legal case. When I have done PLC programming, I would never have thought about such a requirement and would just have inverted the signal if needed. But this is a special instance, so I thought I would ask this community. I have gone through a number of different PLC manuals as well as SCADA software and can't find a block that will allow edge detection configuration.
 
The only thing I can think of that comes close to what you're asking about would high speed counter functionality. That can often be configured for one or two channel, single ended or quadrature. But in my experience the single ended option has always been rising edge.
 
Thank all who responded, but I am actually looking for a counter block that will allow the selection of a rising/falling edge as a trigger. Not for programming but for research that I am doing on a legal case. When I have done PLC programming, I would never have thought about such a requirement and would just have inverted the signal if needed. But this is a special instance, so I thought I would ask this community. I have gone through a number of different PLC manuals as well as SCADA software and can't find a block that will allow edge detection configuration.
I've not personally ever encountered a such a counter 'in the wild' as it were.

As others have noted it wouldn't be particularly difficult to make, but no manufacturer I'm aware of provides one as a basic instruction.
 
All counters are rising edge detect.

If you wanted it to be falling edge, you'd just invert the signal. This could be accomplished with a "configurable" input handling object -- something very common. Rockwell's P_DI block for example has an invert option.
 
... I am actually looking for a counter block that will allow the selection [configuration]of a rising/falling edge as a trigger.... can't find a block that will allow edge detection configuration.

Ah, clarity ;).

The closest I can think of in PLCs is the Siemens LOGO!Soft, which has such functionality in its FBD (Function Block Diagram) language; it is not available in it LAD (Ladder Logic) language.

On most discrete inputs in LOGO!Soft FBD, you can invert the signal at the block. See image below.
Untitled.png
 

Similar Topics

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,584
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,281
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,401
Hello, one question:( Allen Bradley) Why a counter keep counting in a subroutine without a false to true transition every time the subroutine is...
Replies
5
Views
2,497
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,973
Back
Top Bottom