Help - Search - Members - Calendar
Full Version: Alternating Counter Value
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
Raydragon
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.
Snerkel
This should work


Raydragon
QUOTE(Snerkel @ Feb 11 2006, 04:11 AM) [snapback]28384[/snapback]
This should work




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?
Snerkel
Or this way
Raydragon
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 smile.gif
Thanks Snerkel, your a champ.
Snerkel
A slight improvement over the last version
Raydragon
QUOTE(Snerkel @ Feb 11 2006, 06:15 AM) [snapback]28388[/snapback]
A slight improvement over the last version


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?
Snerkel
QUOTE(Raydragon @ Feb 11 2006, 06:34 AM) [snapback]28389[/snapback]
QUOTE(Snerkel @ Feb 11 2006, 06:15 AM) [snapback]28388[/snapback]
A slight improvement over the last version


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?


Yes exactly.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.