Sign in to follow this  
Followers 0
mhowasso

MicroLogix 1 Button Latch Unlatch

36 posts in this topic

Hi All, See attached program file. I have a little problem with a MicroLogix 1500 (RSLogix 500). I am Latching B3:5/8 by pressing input B9:0/8 I am Unlatching B3:5/8 by pressing input B3:5/10 It works very well using the two seperate inputs. What I want to be able to do is press B9:0/8 to Latch B3:5/8. And then press the same B9:0/8 again to Unlatch B3:5/8. I have tried several things to try and do this but it either will not allow the latch to work or the latch will work but it will not unlatch. Any advice or edits would be appreciated. Thanks TEST.RSS

Share this post


Link to post
Share on other sites
Try this - its just a little more complicated than the standard flip-flop by the requirement of the Latch/Unlatch. TEST1.RSS

Share this post


Link to post
Share on other sites
Thanks I will check this out..!!!

Share this post


Link to post
Share on other sites
Mr. Carlton, Is it safe to assume that in rung 0 that output B3:3/5 should be a Latched output..??? Thanks

Share this post


Link to post
Share on other sites
No, it is not safe to assume this. There are times when an Unlatch can be used without a matching Latch. I use it to conditionally turn off the state of a bit for all code which follows.

Share this post


Link to post
Share on other sites
Im glad I asked then. I have not seen this done before. Thanks

Share this post


Link to post
Share on other sites
For do that, I use ote coil. First create a one shot with B9:0/8, for example B9:0/9. Then type this: Bst xic B3:0/9 xio B3:5/8 nxb xio B3:0/9 xic B3:5/8 bnd ote B3:5/8

Share this post


Link to post
Share on other sites
But he mentioned he wanted a latch. An OTE will not last through a power cycle. With a latch/unlatch the state on power down will still be there on power up. It is possible he mentioned Latch/Unlatch in the generic sense but I took him at his word. Edited by b_carlton

Share this post


Link to post
Share on other sites
Yes, I need the output to Latch. Mr. Carlton, I did what you showed and it did not work. I would just like the one button B9:0/8 to Lock and Unlock my Axis. B9:0/8 is the present "Lock PB". B3:5/8 is the Output that Locks Z Axis B3:4/7 is a "Message" bit I use on screen. B3:3/5 is a flasher bit for the flashing the message. B3:5/10 is the present "Unlock PB" Thanks in advance for all your help. Edited by mhowasso

Share this post


Link to post
Share on other sites
TEST_WDESC.RSS

Share this post


Link to post
Share on other sites
I also did what SLCMAN said to do and that did not work.

Share this post


Link to post
Share on other sites
I cannot view or edit your program until Monday. Just replace the bits that you were using for something else with bits that are currently free. I used them, since they were unlabeled, in my post. I didn't want to make assumptions about other bits in your program. If they were used for something important other than in this latch/.unlatch function I couldn't tell.

Share this post


Link to post
Share on other sites
Because I forgot to use b9:0/8 for unlock axis. Here is something should work in LAD4, LAD3 is your original logic. I use b9:100/x for bit I added to your logic. TEST_WDESC.RSS

Share this post


Link to post
Share on other sites
SLCMAN - what is the purpose of the NC of the pushbutton in the toggle rung? I believe that it will prevent the toggle from taking place.

Share this post


Link to post
Share on other sites
When B3:5/8 if off, XIC B3:100/1 XIO B3:5/8 set B3:5/8 XIO B3:100/1 and XIC b3:5/8 maintain B3:5/8 ON until B3:100/1 was set again. So NC pushbutton is used as reset function of this flip-flop

Share this post


Link to post
Share on other sites
SLCMAN, Im sorry but I can not get your version to work. I have attached a file basically showing the two ways that have been discussed. The first one is in in LAD3 and the one you show is in LAD4. The first one works as described, but the second one does not work. (Maybe its something Im doing wrong) Maybe you could modify LAD 4 so it does work. It might just be a simple edit. If not, thats OK also. Anyway, Thanks for all the advice. ONE BUTTON LATCH UNLATCH.RSS

Share this post


Link to post
Share on other sites
Your start / stop PB must be used only in the OSR rung. the XIO in the red circle (see picture) is used as reset master, you can put there interlock, estop and so on. I put the logic in emulator, toggle input for simulate and I did a movies. Look in attachement, you'll see everthing work. The only thing I change is I:0/1 for B3:100/0 for the bit in the red circle. Wish I help Start stop.avi

Share this post


Link to post
Share on other sites
Hi SLCMAN, YES....This time it worked. Thanks so much for the quick reply..!! Edited by mhowasso

Share this post


Link to post
Share on other sites
SLCMAN - I had assumed your program section in post #13 wouldn't work as shown. I see you have changed it in your avi. Good work.It still doesn't use Latch/Unlatch so the output will be turned off by a power cycle. But maybe that's ok. Edited by b_carlton

Share this post


Link to post
Share on other sites
You're right I did a mistake in post #13....I would like to type B3:5/10 instead of B9:0/8 for keep the unlatch PB in the HMI. The logic didn't use latch/unlatch but binary file are retentive so the logic will keep the same state between power cycle. I didn't understand why you say program will lost B3:1/1 state after a power cycle.

Share this post


Link to post
Share on other sites
No - B3:1/1, because it is the target of an OTE, WILL be reset after a power cycle regardless of its state on power down. If it were the target of a Latch it would not. Try it on a actual system if you don't believe me. It is part of the 'pre-scan' function to go through all the rungs and apply their results to any outputs as if the rung had been evaluated as false. An OTE will be turned off. An OTL will not be affected. Edited by b_carlton

Share this post


Link to post
Share on other sites
Again you're right. I tought B3:1/1 will be ON until ote instruction will be scanned. I often use bit as config data or HMI (bit without coil instruction) and in that case, bit state is retain on power cycle. I never have to deal with this logic and power cycle, I can say I learn something today. regards

Share this post


Link to post
Share on other sites
Would this work for toggling based on a single input? Test.RSS

Share this post


Link to post
Share on other sites
Shiner, I tried this and it did not work. Dont really know all the reasons why not tho. Looked good tho..

Share this post


Link to post
Share on other sites
Mr. Carlton, After all the replies, if you dont mind me asking, considering the power down/up issue and anything else, just so Im clear, what is the "BEST" way of accomplishing this One Button Latch Unlatch issue. I just want to use the best way from now on. Thanks for everyones help.

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