PLC Training - Introduction to Ladder Logic

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome to automation technologies training series on ladder logic this is Russell white and I'll be leading you through a brief introduction on ladder logic programming you can find us on the web at I want to take some time on this tutorial to go back to the basics with ladder logic and kind of give an idea what ladder logic really is I want to talk about our inputs and outputs that we have shown here how they work how they go into the real world what data files are and how how they enter into the equation as far as getting our information from the real world into the PLC and back into the real world again okay let's stop for a second and maybe step a little bit back outside the PLC and talk about what really happening and what you're what you're doing what we have here is we have a standard motor control circuit you have a three-phase motor right here and you actually have your control circuit over here this now you have your start push button stop push button and then you have a typical relay with a seal in contact or where when that relay pulls in it actually seals around this momentary start push button so that's our standard motor start/stop circuit that we have for a PLC so what's the difference between the PLC and the regular hardwired option well with hardwired you saw we take our push buttons directly to a relay and it acts directly upon that relay with a PLC we've had our start button and it actually comes into an input card it's wired directly into cards that interface directly to the processor through a rack or some other means so both our start and stop push buttons from our other example a previous example both come in to an input card and then they can be used and processed and we'll we'll see that later when we get into the PLC program they can be manipulated inside the PLC program likewise on the other side we have our our outputs our PLC outputs which is all a different type of card that interfaces directly to our relay motor contactor m1 you see it has a surge suppression device around it to protect the PLC output also a fuse it protects the output but generally the main thing you have here is you have this output directly from the PLC that goes to a relay coil to be able to operate some kind of real-world device so what this now gives us is this gives us a situation where we have our hardwired circuit above here and we have our PLC ladder logic representation of that circuit now this start contact you see the difference they're slightly different in the way that they are shown here but this start contact correlates to the location that this push button into the PLC and the stop contact also correlates to the position where this stop push button is wired PLC and also you know with with the output the output the coils look pretty similar actually but the coil then correlates to an output that's going to drive this relay now from the PLC now we can have we have what's called internal contacts this internal contact right here is actually not something that's coming in directly from the real world it is actually something that's operating off of this coil inside the PLC and is being used inside the program we can get into that and I'll show you that a little bit more later when we get into the program I think it'll be easier to understand them actually I don't like to do this this is uh this is not what we like to stop we actually like to take this relay coil take a contact that would come back from that really cool and then enter that into our PLC program and therefore we actually have a real world understanding when we seal our circuit in if this relay were to drop out for any reason in the field then it would also drop our seal in the program even though our PLC program is operating and driving relays and working with equipment in the field such as a standard circuit would that you might normally deal with you have to remember that it is a program and it has certain ways of operating and it's a very different program so if you're used to to a standard program it's gonna be different and if you're used to just working with relays it's gonna be a little different for you to what you need to understand first and foremost about a PLC program is it does not just operate from the top and go to the bottom and stop that would not work well at all it would scan through one time and and then you would have no further operations so what a PLC program does is it cycles through repetitively through the same program and therefore constantly as updating and constantly trying to maintain the status of the different devices and it needs to control and constantly monitoring the status of the devices that it needs to monitor so what we have in a typical program scan and not all of them are the same and this is just an example we might have a housekeeping section where the program does some communications updates or takes care of overhead in the processor then we have a situation where it would update the data table inputs we take those inputs that we saw from our previous drawing where they come in from the field it would actually pull up that information into the processor so that it'll has that information available for it then it goes through a scan of the logic it works and and there's different ways that different processors will work on the logic most will scan from a left to right and and when you get into a branch situation like this obviously there's uh some slightly different methods there - I'm not going to go into that but the main thing to realize that it then it looks through your logic it starts at the top goes down to the bottom and works through your logic then finally when it's done working on the logic it updates the data table outputs and then it goes back again to the beginning it starts the whole process over again this is called PLC program scan and appeals a program will scan repetitively as it's running and constantly updates its outputs constantly checks its inputs and that's the important thing to remember about programming in a PLC PLC program scans are very quick you will see them on the order of milliseconds microseconds so so we're looking at information that's being processed very quickly and obviously has to be to be able to monitor relays and to be able to monitor encoders and other fast-acting devices out okay we've talked a little bit now about real-world inputs and outputs how push buttons and other inputs get into the PLC and we've also talked about outputs and how we can get information from the PLC and act on real-world items now let's look at this inside the PLC for a second okay now I'm gonna start to throw at you some some stuff that may be a little overwhelming it may be a little you may not quite understand everything but what I want to do is I want to put a lot in front of you and then after a while it'll all start to come together and Angele a little bit so let's look we have right now you know the same kind of ladder designation that we showed on one of our earlier slides and we want to look over here and look at the i/o configuration of the processor we notice we have the processor here and and if you remember a PLC is generally a rack-mounted type device in other words you have slots we have a slot where the PLC would be you have a slot where input and output cards would be and each of them have their own little location in that rack now we have over here a whole bunch of different IO cards that are available that we can use for this particular plc I have chosen an input card and an output card they're both 16 inputs and 16 outputs a they both have 16 channels shall we say and they both will work with a hundred and 20 volt signal this is perfect for dealing with motors and contactors that use 120 volt coils and and in an area where we need to use 120 volt signal levels you all right now we've looked at the two cards that we've added into our system now that information can be accessed the information that actually comes in from those cards can be accessed in our data files we have an input data file and an output data file and that's why our discrete data and our analog data in this particular processor are going to come if I open up my input data table you'll see this one here designates that this is the first slot and we have 0 through 15 what we call bits and each of these is representation of the value of the location or of the signal at that particular location so if you notice we show here that our start and our stop signal are both both of those push buttons are showing being pressed and now I'm not online I'm not actually with and talking to a processor at this moment so I can toggle those and turn those any direction I want now if I look at the output data table same thing 0 through 15 we have slot 2 that we're using here and this will show what is going on and what kind of signal we're sending out to the field okay now let's talk a little bit about what happens with our our inputs and outputs in the program you can see that we have inputs and outputs in our program here these correlate directly with what we have in our data tables is i : 1/0 this is i : 1/2 0 those that's the exact same bit if I cool this bit you'll see a change in the program so this is how we get the input from the input card that we just added into our processor into our program we also have a stop push button coming into our program and we have an output going to the coil or the relay or contactor out in the field to be able to control our motor or other device okay let's look at our different components we have of this rung right here we have a normally open contact normally close contact and a actual coil for our output now I like to use the same terminology we would use when we're talking about relays now in real-world devices I think that that's afterall what we're trying to mimic so I like to kind of keep things simple and make it easy for people who are actually used to dealing with electrical components in the field I also need to point out your power rails here on the left and on the right they correlate with a real electrical circuit where you might have a hundred and twenty volts and a neutral or a plus and a minus if you're talking about some kind of DC circuit and so this if you if you look at this and hopefully you have some elementary electrical knowledge or circuit knowledge to be able to and you really need that to be able to understand ladder logic and feel comfortable with it you look at the power coming in on this side and and traveling through contacts and operating a coil and then finally making it to it to neutral so if you understand electrical circuits then you'll understand okay that's made so power flows this is made power flows okay this coil should be on in and in a real running processor this quote would be on with this on and this on also and at that point we would seal the circuit in because this is the same as this so that's what we want to talk about next we want to talk about and I mentioned that we would get to this Luke get back to this is called internal contacts what we have here is this is the exact same address as that output now the nice thing in there and the big plus with PLC's and the big reason that they were they were used and when they first started was that to be able to take place and take the place of many different relays we want to be able to to do a lot of this stuff internally you could actually have a bunch of different in turtle coils internal contacts I could have a hundred of these contacts if I wanted to in my program I can use as many of these contacts as I need to be able to take actions in my program so that's the beauty I can't find a real relay with a hundred contacts I can't I can't very easily have a hundred relays in a panel and I have to deal with the wiring and how to deal with the maintenance issues but with a PLC I can put a hundred coils in here have a hundred outputs going to different field items and very easily and take a take a very little amount of space also so that's the power of the PLC and that's what an internal coil is it doesn't really have any real-world action happening on it it's just a representation of as if you had a contact coming off this coil here and we're able to use it in the program now one a very important thing is you do not use multiple outputs in a program and we'll get more in detail of why you don't do that later some processors will not even allow you to do that but we'll get into that more later I want to take a moment now to look at the PLC program and and watch it as the actions happen as a start push buttons press the stop push buttons press to give you an idea how the program will react and and what really happens in the PLC program now in a real PLC program you wouldn't be able to watch things happen as slowly as we're going to show them here but for examples purposes I want to kind of I guess slow things down and kind of give you a feel for what things you know how things really work in that program so if you look at this frame right here you'll see that the start push button is pressed and so we have power that's made to that coil so that coil will immediately go on now the coil is on and the start push button is still being held and we'll be able to watch it now as it goes from a transition from on to off as the operator lets go of the start push button so we have a situation now where our contactor is pulled in and it's going to stay this way until our stop push button is pressed removing power from that part of the rung so what we have here now is our stop push button is pressed and you would not have a situation like this in a real PLC where your coil would still be energized with a stop push button press but I'm trying to give you an idea of a very slow motion of how things work in the PLC so with that stop push button press now the coil has dropped out the ceiling has dropped out and you notice the stop push button is still being pressed because that normally closed contact is off so now we've ended up back where we started with the stop push button not pressed start push button not pressed and the motor is off or the coil is off I hope you understand a little better now what later' programming is all about and how ladder logic correlates with the real world how inputs get into the PLC and how that PLC is able to work on the real world and work on real world items this concludes our introduction to ladder logic we hope you've enjoyed it and hope you join us for further training series on automation in c.com thank you
Info
Channel: automationnc
Views: 1,180,269
Rating: 4.7628918 out of 5
Keywords: googlevideo
Id: Ei4_HqzUFBs
Channel Id: undefined
Length: 19min 10sec (1150 seconds)
Published: Mon Feb 03 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.