gavin44

up-down counter

11 posts in this topic

Hi, How would i go about using one input for the up count but multiple inputs (say 4 inputs) for the down count. Many thanks in advance. :)  

Share this post


Link to post
Share on other sites

just OR all count down inputs

Share this post


Link to post
Share on other sites

Use all gates in parallel ...i mean follow Or logic.. for multiple i/p

Share this post


Link to post
Share on other sites

If multiple down counts occur simultaneously what do you expect as behavior? Will just one down count be appropriate?

1 person likes this

Share this post


Link to post
Share on other sites
18 hours ago, b_carlton said:

If multiple down counts occur simultaneously what do you expect as behavior? Will just one down count be appropriate?

No it needs to count all items moving passed all four sensors, OR'ing the four inputs does not work accurately, not sure how to solve this one 🤔

Share this post


Link to post
Share on other sites

Then don't use an up-down counter.

Write a rung with multiple branches to ADD or SUB for each case.

1 person likes this

Share this post


Link to post
Share on other sites

If using ADD or SUB make sure to one-shot the conditions to do the ADD/SUB only once for each.

1 person likes this

Share this post


Link to post
Share on other sites

As im using 1 sensor (conveyor input) to count up and 4 sensors (conveyor output) to count down, could i use 4 separate CTD's and then use maths to add the accumulative total (CTD1acc+CTD2acc...) , Then Somehow add CTU0. along with that assigning the relevant outputs, its all a bit hazy :doh: 

Share this post


Link to post
Share on other sites

I found it easiest in a similar application to just do the ADD and SUB blocks and not use a counter at all. Actually mine was 4 separate Up counts and one Down count input. With the complexity it was more understandable to group the 5 rungs together with 4 up counts followed by the one down count.

2 people like this

Share this post


Link to post
Share on other sites

Thanks b_carton i managed this to work but looking deeper into the project i have had a change of mind, feeling like it could get to complex. so i have decided to create down tablet bottle detection using bit shift and an encoder just worried that this could be too simple.

Share this post


Link to post
Share on other sites

Whatever works in your application is right.:-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now