![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#16 |
|
Member
![]() Join Date: May 2008
Location: Delhi
Posts: 183
|
----||-----(P)-----(#)-------|/|-------(s)m1.0
pb M1.2 #temp m1.0 ----||-----||--------|/|----------------(r)m1.0 #temp m1.0 pb |
|
|
|
#17 |
|
Lifetime Supporting Member + Moderator
|
First let's get the labels lined up...
----||-----(P)-----(#)-------|/|-------(s)m1.0 Now, I'm not understanding how this can work. Normally, you alternate on the leading edge of an input, yet your reset rung uses a --]/[-- for the pushbutton. Therefore, M1.0 can only reset when the pushbutton is released. My next concern is the #temp bit. Won't that be on for only one scan when the pushbutton is initially pushed? If so, then how can it be on when the pushbutton is released, allowing M1.0 to reset? ![]() -Eric |
|
|
|
#18 |
|
Member
|
__________________
Arik Barak Control Israel
|
|
|
|
#19 |
|
Member
![]() Join Date: Feb 2010
Location: Perugia
Posts: 5
|
In that pdf file you can find a ladder diagram which I created using step7 mw.
When I press the button (I0.6) M0.0 and M0.1 turn on. When I press the button again that merkers turn off. http://electronline.it/doc/sist.movim..pdf
__________________
http://sites.google.com/site/plcandcircuitdiagram/home |
|
|
|
#20 | |
|
Member
|
Quote:
|
|
|
|
|
#21 | |
|
Member
![]() Join Date: Jun 2012
Location: surabaya
Posts: 1
|
Quote:
|
|
|
|
|
#22 |
|
Member
|
The boolean expression plus a OSR as suggested by TCONNOLLY seems to work fine and is the simplest solution I have seen yet on this forum
|
|
|
|
#23 |
|
Member
![]() Join Date: Apr 2012
Location: IDAHO
Posts: 46
|
I'm with TC, but I would have the ctr reset when it reaches 2, so when the
acc = 0 -> off, acc = 1 -> on, acc = 2 -> rst -> acc = 0 -> off. That way you don't have the ctr some how getting beyond a dint or sint or whatever data type you are going to have it setup as. This also allows for more options, such as confirmation options. acc = 0 -> off, acc = 1 -> confirm on, acc = 2 -> on, acc = 3 -> confirm off, acc = 4 -> rst -> acc = 0 -> off. (Note - you would have to setup a timer so the confirm is only an option for a couple of seconds, then force the acc back to its last state. A subtract function might work for this, or move statements depending if 1 or 3.) Oh, and I like having an indicator over lay my pushbuttons. This allows the pushbutton to do what it is intended to do and the indicator can change depending on what is going on in the machine. Last edited by VAN; June 22nd, 2012 at 02:18 PM. |
|
|
|
#24 |
|
Member
|
I made a Toggle AOI using the JK flip-flop FB instruction in 5000. I know this doesn't help if your using a different platform.
|
|
|
|
#25 |
|
Member
|
OP mentioned DIFU, so I guess he may be using Omron, I have seen this version which is suitable for CJ series and up, [credit is not mine]
Oops, just noticed this thread is 2 year old, sorry. Last edited by chavak; June 22nd, 2012 at 07:57 PM. |
|
|
|
#26 |
|
Member
![]() Join Date: Feb 2008
Location: Gauteng
Posts: 21
|
To the original OP this might be homework, but I had exactly the same problem with ControlLogix and RSLogix5000 software.
The Pushbutton in this case is an input signal from FactoryTalk. The operator needs to press a button to change the duty state of the duty controller. In RSLogix the [One Shot] is an [ONS] object, but you can replace this with whatever your system allows. X1 and X2 are two memory bits I use in my code. X2 will be the toggled bit you connect to whatever function you require. A simple but effective bit of coding. Not my own though. Also had to ask somebody how they've done it in the past.
I too would have used a D-Latch flip flop, but unfortunately in my coding this function is not available in Ladder logic. |
|
|
|
#27 | |
|
Lifetime Supporting Member + Moderator
|
Quote:
As I have stated already, a "toggle" should not be affected by any other event than the logic that drives it. If you want a toggle to reset on restart, then program it in the start-up section of the code for all to see.....
__________________
___________________________ ControlLogix & SLC Trainingabtrain@tiscali.co.uk www.abtrain.co.uk tel: 07506 73 9999 self-help and help-yourself often get confused - ancient daba proverb |
|
|
|
|
#28 | |
|
Lifetime Supporting Member + Moderator
|
Quote:
So the idea of using a common "toggle" (whichever way you do it), and having specific startup resets, actually documents or reinforces the reasoning behind why you are resetting specific toggles, in exactly the same way you sometimes have to write start-up code that resets or presets numerical data.
__________________
___________________________ ControlLogix & SLC Trainingabtrain@tiscali.co.uk www.abtrain.co.uk tel: 07506 73 9999 self-help and help-yourself often get confused - ancient daba proverb |
|
|
|
|
#29 | |
|
Member
![]() Join Date: Mar 2012
Location: Alberta
Posts: 202
|
Quote:
i agree |
|
|
|
|
#30 |
|
Lifetime Supporting Member + Moderator
|
__________________
___________________________ ControlLogix & SLC Trainingabtrain@tiscali.co.uk www.abtrain.co.uk tel: 07506 73 9999 self-help and help-yourself often get confused - ancient daba proverb |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Troubleshooting basic code | johnfarrugi | LIVE PLC Questions And Answers | 10 | January 27th, 2009 06:41 PM |
| push button as a toggle switch | kaushikelectrical | LIVE PLC Questions And Answers | 15 | December 7th, 2008 10:22 AM |
| RSView ME - Momentary Push Button Stuck? | sthays10 | LIVE PLC Questions And Answers | 20 | January 18th, 2006 10:29 AM |
| motor on and off with single push button | saurabh_bmit | LIVE PLC Questions And Answers | 30 | August 11th, 2005 02:12 PM |
| using ^C in BASIC module | ettikudiappan | LIVE PLC Questions And Answers | 9 | November 24th, 2003 09:10 AM |