Register  |  Login
 
PLC Training Forum
Forum
 
  Forum  PLC Programming  Allen Bradley  Alternating two Outputs with one button
Previous Previous
 
Next Next
New Post 9/7/2011 7:03 PM
  dronai
14 posts
Newbie


Alternating two Outputs with one button 

This was the logic I was describing when talking about a Flip Flop.  The enable bit uses this address to accomplish this task.  C5:0.ACC/0

It used the accumulated amount from the counter.  Someone else showed me how to do this.  .ACC did the trick,  I don't really understand this address, but I see the result.

 

I was wondering how to alternate two outputs with one push button using another method ?

 
New Post 9/8/2011 10:13 AM
  Admin
177 posts
Journeyman


Re: Alternating two Outputs with one button 

Ok, Im not sure what you are doing with a counter to create a flip flop.  I can explain the addressing.  I assume you have watched the vids on counters and are familiar with the accumulator or .ACC register.  Keep in mind that any integer (which the ACC register is) in the SLC is made up of 16 bits.  by addressing .ACC/0 you are selecting the first bit of that integer.  The result being that the bit will alternate between 0 and 1 every time the counter increments.  Ahhhh, now I understand the flip flop function.  The definition of a flip flop being the toggling of the output based on the transition of the input to the circuit or the logic in your case.   I've never seen a counter used that way, but that will work.  With this method, you would simply take the addres C5:0.ACC/0 and use it for an XIC or normally open contact in the first rung driving output 1 and use the same address in an XIO on the next rung driving output 2.  Alternatively  you could use the address for output 1 in the XIO for the second rung. 

Now as for an alternate method to achieve this, I am sure there are many.  Since you are a student here trying to learn PLC programming, I would suggest you first make an attempt at the logic and ask quesitons on direction and problems that come up.  It would be better to be directed and nudged the right direction than to be given the solution.  That said, I can hint that there is a away to do this with a single rung that would drive an output to replace the ACC/0 bit you are using above.  It involves using a oneshot, latch, unlatch and standard OTE output all on one rung.  Take that info and see what you can do with it.  

 
New Post 9/8/2011 5:04 PM
  dronai
14 posts
Newbie


Re: Alternating two Outputs with one button 

Ha  !!!  You want to torture me   OK you are right.  We do learn better by a little suffering first, and a big feeling of accomplishment when we succeed.   I will take on the challenge, and try the hints you have given me.  Ohh that One Shot function again !!!

 
New Post 9/9/2011 9:39 AM
  Admin
177 posts
Journeyman


Re: Alternating two Outputs with one button 

That's my job!  torture-r-us.  Don't get hung up on the oneshot.  It is a very simple instruction.  All it does is limit the logic after it to seeing a 1 for just one scan.  So every time the logic before it changes from 0 to 1, it allows a 1 to be available for just one scan after it.  Enter the add logic shown in the video and play with that to understand it better.  Enter a rung without the oneshot - test it.  Then add the oneshot and see the difference.  Also, use the ONS in the micrologix.  The OSR has a different setup and adds nothing to what you get from it.  Basically it's a useless addition.

 
Previous Previous
 
Next Next
  Forum  PLC Programming  Allen Bradley  Alternating two Outputs with one button
  
 

 

  
Like this Site?

Check out our PLC Training Facebook site and "like" us!

Click Here!

  
Terms Of Use  |  Privacy Statement
Home  |  Subscriptions  |  Training Videos  |  PLC Training  |  Articles  |  PLC Training Forum  |  Contact  |  About Us
Copyright © 2008 - 2011 by Automation Technologies, Inc. - All Rights Reserved