Sign in to follow this  
Followers 0
Raydragon

Alternating Counter Value

8 posts in this topic

Hey guys, just need a quick hand with an annoying little problem... I am trying to come up with a way to make some simple counter code that will alternate the preset of a counter between values of 2 and 3 each time a tin stop operates to allow alternating groups of 2 and 3 tins into our breadroll prover. i basically need it to count 2 tins, then the stop comes down to block the tins and the next time i need the stop to allow 3 tins through. The stop is reset ( allowed to go up) by the loading arm of the prover and i have that side of it worked out i just need a really simple way of getting the dang counter to alternate the values . This is to suit a Micrologix 1500 processor. I don't have access to the code (or logix) at home but any help would be appreciated.

Share this post


Link to post
Share on other sites
Hmm thanks for that, i think i can adapt that into the program. Thanks for the quick reply. This has been driving me nuts all day, i kept trying to get it right ( there are a few tricks to the timing of the tinstop) and the code kept getting longer and uglier with each go, needed a fresh perspective :-P Are there any other ways to do it, just for interests sake?

Share this post


Link to post
Share on other sites
Heh, yeah that is the way i was heading, ie using MOV's and things but i kept getting them moving when i didn't want them to Thanks Snerkel, your a champ.

Share this post


Link to post
Share on other sites
A slight improvement over the last version

Share this post


Link to post
Share on other sites
I take it that you say it is an improvement as in it is a little bit more robust in terms of handling preset values other than 2 or 3, in case that somehow happens?

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
Sign in to follow this  
Followers 0