Simple Ladder Logic????

Join Date
Jun 2007
Location
Oxford, UK
Posts
163
I am an apprentice so i think i can get away with what seems like a stupid question.

im writing a program in RSlogix500. basically i cant work out how to put together a rung or collection of rungs that do the following. my knowledge of RS logix is good, but this has eluded me.

I want to press a button(button 1) once to run a conveyor. then at any point from then on i want to be able to use button 1 again to turn that conveyor off again. the conveyor is just a OTE on one rung. anything i try either wont turn it off or wont start it at all. am i being stupid??


Cheers for you help
 
Greetings bmw_apprentice ...



no - it's not a "stupid" question - and it's been covered many times on the forum ...



try doing a search for "flip-flop" ...



instructors have been assigning this same exercise for years ... the main thing is not just to "GET-IT-TO-WORK" but to understand HOW and WHY it works ...



you can learn quite a bit about how the PLC processor executes its ladder logic program if you dig deep enough into this ...



going deeper ... let’s take your statement:



the conveyor is just a OTE on one rung



actually that’s not correct ... the CONVEYOR is a device in the field ... there is a BIT (in other words, a BOX) inside the PLC processor that is associated with the CONVEYOR ... that bit/box can contain either a ONE or a ZERO ... at the END of each pass through the ladder logic, the processor SENDS the status of that bit/box out to the CONVEYOR (the field device) ... if the bit/box contains a ONE, then the CONVEYOR should turn ON ... if the bit/box contains a ZERO, then the CONVEYOR should turn OFF ...



now for the OTE ... the OTE is NOT the CONVEYOR ... the OTE is an “instruction” (a command) located in the PLC’s ladder logic program ... if the rung logic leading into the OTE is TRUE, then the OTE will instruct the processor to WRITE A ONE into the associated bit/box ... if the rung logic leading into the OTE is FALSE, then the OTE will instruct the processor to WRITE A ZERO into the associated bit/box ...



secret handshake: when people (even well-meaning ones) tell you that the OTE “IS” the output, then they’re leaving out quite a lot of the story ... that “watered down” method of explaining ladder logic will work - but only about 95% of the time ... well, maybe 99% - with a tailwind ... BUT ... it will NOT work 100% of the time ...



the “Flip-Flop” logic that you’re working on will go a long way toward helping you understand EXACTLY what’s going on as the processor moves through its program - IF you’ll dig deep enough ... most people don’t dig that deep ... most people just “GET-IT-WORKING” and then move on with the next assignment ...



good luck with your project ...
 
Last edited:
You are trying to do a Toggle or Flip-Flop. If you search the forum for those key words you can find many examples.

Here is one that I like to put out there because it uses no special instructions and is easily portable to all platforms. Just replace the Light with you conveyor output:

PBLightLadder.PNG
 
Cheers guys.


i have used flip flops within the siemens S7 but didnt think about it in this program.

ill try it tomorrow and let you know if i get anything :) thanks a lot
 
Cheers Ron :)

Having looked further into it I completely understand what you are talking about. I looked about for the flip flop but I dont think I have it avaliable. I chose to take a different route.

I chose to use a one shot command (that will only stay active for one scan :)) and then use another bit to almost trick the scan. This worked fine. I`ve explained it terribly, but thanks for your advice anyway.

Regards

Ben
 
bmw_apprentice said:
I looked about for the flip flop but I dont think I have it avaliable.
Oh yes, you have. But it's not a simple box instruction as with S7. And it's not called a SET and a RESET either. Allen-Bradley uses the terms LATCH and UNLATCH instead. Look for -(L)- and -(U)- in the instructions.

Kind regards,
 

Similar Topics

I am new to PLC programming and recently purchased a demo unit for a WAGO 750-881. I am trying to do a simple test in ladder logic that does the...
Replies
1
Views
2,285
I'm just starting to learn Ladder Logic Programming. I'm using Allen Bradley RSLogix 5000. I've been tasked with developing a 'Simple' Coffee...
Replies
13
Views
11,219
It would be awesome if someone could help me out with this problem. We can only use basic XIC XIO OTE OTL and OTU instructions. I'm not sure on...
Replies
33
Views
9,067
We have an OMRON SYSMAC C40K-CDR-A 2065C Programmable Controller with a blown out input channel #200. All other inputs are free spares and...
Replies
1
Views
4,619
This is an assignment for class. I'm about to pull my hair out on this one. All the others have been very easy using timers and counters, but I'm...
Replies
44
Views
18,743
Back
Top Bottom