Reputation: 81
I would like to model railway interlocking. The counter recieves impulses with the following parameters:
Here is the signal generator:
These are the block paramaters:
Sine:
4-impulses:
And this is the sign in which I would like to count the impulses:
In the example I would like to count 4 impulses in one period because we know that one period is 1950 ms.
Upvotes: 2
Views: 946
Reputation: 30101
This feels fairly convoluted, but it's hopefully easy to follow and adapt.
Essentially you can check how long the pauses are, and if that pause duration satisfies your criteria then increment a counter.
Comment groups added for what each group of blocks is doing, might be possible to simplify this using some latched timers but I didn't explore the block library so this uses all very fundamental blocks.
Diagram (click to enlarge)
Scope:
Upvotes: 1