Help - Search - Members - Calendar
Full Version: toggle program
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
tlarmstr
Being a Newbie and also out of the programming thing for a while I am asking for some help. I need to know the best way to Toggle two different outputs off of the same Inputs. Here is what is happening, I am using a 2 position closed center solinoid to control clamping of parts on a fixture. I need to be able to place the parts in the fixtrue and clamp the parts Using two opto-touch, but then if the parts do not seat correctly I need to use the same opto-touch buttons to unclamp the parts. I know that both outputs cant be on at the same time so that is where I get into trouble. If you could help that would be great.

sequence:

* Place parts in fixture
* touch opto buttons ( obviously I have an anti-tie down ckt), and they clamp the parts
* The parts do not seat correctly
* touch the same opto buttons to unclamp the parts
* Reset parts in fixture
* touch opto buttons , and they clamp the parts

Tim shrug.gif
gravitar
So you would need to do something like, (stated verbally)

If the solenoid is OFF and the palm buttons are ON, latch bit X

If the solenoid is ON and the palm buttons are ON, unlatch bit X

If bit X is latched, energize solenoid output

you would probably need to one-shot the first two rungs to prevent chattering.

This is a single solenoid, spring-return valve and a dual-acting cylinder, right?
TechJunki
The following program demonstrates the use of a FlipFlop to alternate two outputs using the same input in a Micrologix 1500 Series A.

JJ
gravitar
Oh nevermind.. I read it again. It is a dual-solenoid valve. The concept is very similar though..


If the forward solenoid is OFF and the palm buttons are ON, latch bit X

If the forward solenoid is ON and the palm buttons are ON, unlatch bit X

If bit X is latched, energize forward solenoid output

If bit X is unlatched, energize reverse solenoid output

(again, oneshotting the latch/unlatch rungs)

Does that sound like it would work for what you are trying to do?
tlarmstr
Thanks for the help, seems like I tried this ( maybe in a more convoluted way), but logic says it will work. Thanks for the reply

Tim
Chris Elston
Guys....don't forget to look in the downloads section. There are already examples in there that can be downloaded.

http://forums.mrplc.com/index.php?act=Downl...s&CODE=01&cat=2

Down toward the bottom are two or three examples of toggling a bit. That should give you a couple of more ideas.
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.