Forums.MrPLC.com: MicroLogix 1 Button Latch Unlatch - Forums.MrPLC.com

Jump to content

  • (2 Pages) +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

MicroLogix 1 Button Latch Unlatch Rate Topic: -----

#1
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
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

Attached File(s)

  • Attached File  TEST.RSS (36.5K)
    Number of downloads: 171

0

#2
User is offline   b_carlton 

  • User
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 962
  • Joined: 16-September 04
  • Gender:Male
  • Location:Yakima, Washington
  • Country:United States
    United States
Try this - its just a little more complicated than the standard flip-flop by the requirement of the Latch/Unlatch.

Attached File(s)

  • Attached File  TEST1.RSS (35.5K)
    Number of downloads: 237

An output is a PLC's way of getting its inputs to change.
0

#3
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
Thanks
I will check this out..!!! :-)
0

#4
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
Mr. Carlton,

Is it safe to assume that in rung 0 that output B3:3/5 should be a Latched output..???

Thanks
0

#5
User is offline   b_carlton 

  • User
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 962
  • Joined: 16-September 04
  • Gender:Male
  • Location:Yakima, Washington
  • Country:United States
    United States
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.
An output is a PLC's way of getting its inputs to change.
0

#6
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
Im glad I asked then. I have not seen this done before.

Thanks
0

#7
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada
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
------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#8
User is offline   b_carlton 

  • User
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 962
  • Joined: 16-September 04
  • Gender:Male
  • Location:Yakima, Washington
  • Country:United States
    United States
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.

This post has been edited by b_carlton: 26 January 2012 - 10:45 PM

An output is a PLC's way of getting its inputs to change.
0

#9
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
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.

This post has been edited by mhowasso: 27 January 2012 - 10:04 AM

0

#10
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States

View Postmhowasso, on 27 January 2012 - 09:59 AM, said:

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.

Attached File(s)


0

#11
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
I also did what SLCMAN said to do and that did not work.
0

#12
User is offline   b_carlton 

  • User
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 962
  • Joined: 16-September 04
  • Gender:Male
  • Location:Yakima, Washington
  • Country:United States
    United States
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.
An output is a PLC's way of getting its inputs to change.
0

#13
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada

View Postmhowasso, on 27 January 2012 - 10:11 AM, said:

I also did what SLCMAN said to do and that did not work.


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.

Attached thumbnail(s)

  • Attached Image: Capture.JPG

Attached File(s)


------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#14
User is offline   b_carlton 

  • User
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 962
  • Joined: 16-September 04
  • Gender:Male
  • Location:Yakima, Washington
  • Country:United States
    United States
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.
An output is a PLC's way of getting its inputs to change.
0

#15
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada

View Postb_carlton, on 28 January 2012 - 11:05 AM, said:

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.



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
------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#16
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
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.

Attached File(s)


0

#17
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada
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

Attached thumbnail(s)

  • Attached Image: Capture.JPG

Attached File(s)


------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#18
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
Hi SLCMAN,

YES....This time it worked. :-2

Thanks so much for the quick reply..!!

This post has been edited by mhowasso: 29 January 2012 - 10:37 AM

0

#19
User is offline   b_carlton 

  • User
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 962
  • Joined: 16-September 04
  • Gender:Male
  • Location:Yakima, Washington
  • Country:United States
    United States
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.

This post has been edited by b_carlton: 29 January 2012 - 11:12 AM

An output is a PLC's way of getting its inputs to change.
0

#20
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada

View Postb_carlton, on 29 January 2012 - 11:11 AM, said:

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.



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.
------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#21
User is offline   b_carlton 

  • User
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 962
  • Joined: 16-September 04
  • Gender:Male
  • Location:Yakima, Washington
  • Country:United States
    United States
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.

This post has been edited by b_carlton: 29 January 2012 - 02:38 PM

An output is a PLC's way of getting its inputs to change.
0

#22
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada

View Postb_carlton, on 29 January 2012 - 01:26 PM, said:

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.



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
------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#23
User is offline   Shiner 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 286
  • Joined: 18-November 09
  • Gender:Male
  • Location:Houston
  • Country:United States
    United States
Would this work for toggling based on a single input?

Attached File(s)

  • Attached File  Test.RSS (32K)
    Number of downloads: 81

0

#24
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
Shiner,

I tried this and it did not work. Dont really know all the reasons why not tho.

Looked good tho.. :no:
0

#25
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
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.
0

#26
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada

View Postmhowasso, on 30 January 2012 - 12:25 PM, said:

Shiner,

I tried this and it did not work. Dont really know all the reasons why not tho.

Looked good tho.. :no:



It's didn't work because if B3:0/0 is off, logic will set it [XIO B3:0/0 OTL B3:0/0] then the program reach the branch [XIC B3:0/0 OTU B3:0/0] and reset B3:0/0.


Double clic on the rung number to see how the program is scanned: XIC B3:0/1 ONS B3:0/2 BST XIO B3:0/0 OTL B3:0/0 NXB XIC B3:0/0 OTU B3:0/0 BND
------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#27
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada

View Postmhowasso, on 30 January 2012 - 12:31 PM, said:

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.


ok I did my homework and now I can offer to you ver3 who contain latch/unlatch thru one pushbutton and value is retain thru power cycle. Mhowasso, note that previous version work but they lose status of memory bit on power cycle. This is mean if axis is lock, it will be unlock on power up. I'm sure sure one of those version will fit to your application. I did a mistake (who can say he never make one) about power up and I'm sorry for that. For me, the best way is a simple way, without too many unclear rung and also....with comment! I prefer ver2 if you don't care about power up, if retentive is needed use ver 3

Attached File(s)


------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#28
User is offline   mhowasso 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 287
  • Joined: 05-September 09
  • Gender:Male
  • Location:Owasso, Oklahoma
  • Country:United States
    United States
Hi SLCMAN...

You are the MAN..!!!

Thanks so much for your replies.

I, like most, just want to learn and do things the best way the first time.

I also understand that sometimes there is not a BEST way, but many ways
that will work and get the job done.

Thanks again for your patience with me.

PS. Just curious, what is the fix for Shiner's program..???

This post has been edited by mhowasso: 31 January 2012 - 05:43 AM

0

#29
User is offline   slcman 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 331
  • Joined: 24-March 05
  • Gender:Male
  • Country:Canada
    Canada

View Postmhowasso, on 31 January 2012 - 05:42 AM, said:

Hi SLCMAN...

You are the MAN..!!!

Thanks so much for your replies.

I, like most, just want to learn and do things the best way the first time.

I also understand that sometimes there is not a BEST way, but many ways
that will work and get the job done.

Thanks again for your patience with me.

PS. Just curious, what is the fix for Shiner's program..???



I already post a reply to this program. Look at post 26
------------------------------------------------------------------------------------------------------------------------------------------------------------
SLCMAN
0

#30
User is offline   nehpets 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 33
  • Joined: 17-May 10
  • Country:Wales
    Wales
Just another angle, the status of the counter is retained

Attached File  ONE BUTTON LATCH UNLATCH 3 version.RSS (59K)
Number of downloads: 116


Steve
0

Share this topic:


  • (2 Pages) +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users