Allen Bradley PLC Programming Sequencer Tutorial. Sequence Control

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is tim and welcome to talks with tim live michael how are all our statistics looking over there everything looking good nice almost okay we're almost looking good that's that's better than not looking good i guess but all right a little bit about today to you know we've this is what our third live stream and we're gonna have a little more structure in this one we're gonna be talking about various methods of sequencing machine steps and this one we're gonna try to make you know a lot of you ask can we break this up in some individual videos we'll maybe try that we'll see how it goes and also we're going to try to add some chapters so like so then the other ones have kind of been exploratory so it's really hard to organize something that was really hey let's see what's going on here so this one hopefully will go a little better so just a little bit about what all we will be going over is i have these in studio 5000 now we're actually going to do these in connected components workbench and there's a couple reasons for that is one i have a lot of people lately have said they're really struggling with connected competitors workbench because it's so much different than studio 5000 you can't just use the same programs in one that you would use in the other and all these that i've written today at least i believe will work in connected components workbench that's what we're going to find out but i believe if you're using we'll call it really sound code i believe it is transferable easily from studio 5000 to connecting but it's workbench actually i believe it's probably transferable across most plc platforms and so what we're going to do today is first we're going to have a basic counter this is kind of what we went through in rs lot in our first live stream about my first rs logics program so we're going to write this one and then we're going to do a hybrid of it that i think may work a little better and then we're going to go through the ceiling because uh see jeff kuiper this is one that he recommended so we're going to go through that one and then we'll have a latch on latch and we're going to we're going to do the bit shift left i'm not a big fan of this one but this one was requested several times this week so we're going to go through it and then we're going to hit a method of using a move instruction to track it and we did talk about this in the last video and then we're going to have something similar it's a multiply way of sequencing and finally we're going to have this one right here this is the one that actually i think today i'd recommend but we'll save it until we go after go through all these so we can kind of see the pros and cons of it let's see what else is on my list today all right we'll see we're going we're going to be doing see this and connect to components workbench another reason we're doing it is that you can download connected components workbench for free so that just opens it up to a lot more people in fact right now i'm going to drop a link into chat where you can download the connected components workbench software also i didn't mention in chat today we are going to have a little bit of a drawing on getting people to participate in chat we you know originally the reason everybody wanted the live stream was so they could ask questions and you know get kind of immediate feedback or kind of steer you know where these episodes were going and i get emails after every single live stream saying i had this question but i i didn't know if it was a dumb question so i didn't want to ask it there are no dumb questions so put all your questions in chat and for everybody participating in chat today you will be entered into a drawing to get 10 percent off your next plc trainer or plc tools purchase from tw controls now participation does not mean saying hi now go ahead and say hi you can say hi in chat but that doesn't count as participation so ask a question or suggest something or even if you you think my method is bad just say hey i think your method is bad so um all right i did drop that link in there so this will this link here in chat will take you to how to download connected components workbench which let me just pop that over here and while we're here we put out a newsletter every week that has a new automation tip or mainly a new lesson if you scroll all the way to the bottom you're going to see that you can sign up for our newsletter there so go ahead and drop your email address into it it's not real sales pitchy really it's hey um we're we just uh posted this video go check it out and speaking of videos it's also very helpful if you subscribe to our channel so right here if you'll click on the youtube video or any of our videos you'll see that red subscribe button if you'll hit that it helps us out a whole lot but everyone said that they wanted to see sequencing from the ground up or you're going to see it very from the ground up because i was short on time today and i didn't have time to wire this micro 820 trainer so we're going to take it from wiring the micro 820 to some buttons and some lights just to give us something basic we're not doing any exotic sequence in here because really if you understand the fundamentals you can add anything to it but we're going to use this wiring diagram let me get it over here we're going to be using this wiring diagram to wire up our micro 820 so mainly on this side we're going to put jumpers from all of our normally open contacts of our four buttons and our switch and we're going to take it to 24 volts and then we're going to connect them to input 4 5 6 7 and 8 and the most often overlook is we're going to take this com 0 here which is the common for all of these terminals and we're going to take it to our minus 24 volt and then on the same on the other side we're going to jump on one side of all our lights and it's going to go to the minus of our 24 and then we're going to take light number one it's going to go to output 0 2 to output 1 light 3 to output 3 i'm like like 3 to output 2 and light 4 to output 3. so just a little bit this is one of our standard plc trainers let me just spin it around where you can see exactly what we're doing is in the end what we're going to be doing is we're wiring up these four buttons right here and these four lights just to give us something to sequence and the way this is going to work is we're going to be in step one and when you press button one it's going to go to step two press button two is going to go to step three and then at least to add a little variability we're gonna make it where if you press button three for at least three seconds it'll go to step four press that it's gonna go back and repeat itself just so we can talk about methods of sequencing so i'm going to grab some wire and go ahead and hook up just these jumper wires i'm just going to jumper all of well actually not all we're going to go from switch one through button one and this is going to be the green contacts that's going to be our normally open contacts so i have one wire in the first one and i'll take that wire and another wire and i'll put it into button two and then i'll take that wire and another wire and put it in button three and then i'll take that wire and another wire and put it in button four and then i'll take that wire and an additional wire and put it into switch one so that is going to jump for all of these and i'm going to connect this to our plus 24 volt and that'll be any of the left terminals right here and now if i go back to my wiring diagram then i see that button one the other side of this green contact needs to go to input four and then they're just going to sequentially go to five six seven and eight and michael is saying that i need to look at my chat are are these wire diagrams on your web page that is an excellent question laura and yes they are let me go here and get that link for you so all of our standard wiring diagrams can be found wearing diagrams at that link and this actually includes our control panel wiring diagrams also but if you'll scroll down then here you can find all the wiring diagrams and the one that we're using right now is this trn-bas m820aoi that's what we're going to use great question thank you but okay so the other side of button one is going to go to input four and then they're just going to sequentially go up to five six seven and eight so i am going to connect the wire to the bottom of button one screen contact and i'm gonna and i'm gonna connect it to input 4. now that may not be that clear let me i did grab a picture of this so if we're looking at the top of this then you've got a 10 volt reference you get a minus 24. we're not using those and then we have input 0 which actually on our drawing goes to the potentiometer but for this exercise we're not going to need it but then we're starting right here so button one is going to go to input four and then button two button three button four and then switch one so that's what we're going to be doing all right so i have a wire to button one go into input four now i'll take a wire from button two and it'll go to input five and then button three input six button four go to input seven oops wrong work input seven and then finally switch one goes to input eight well absolutely the most left out piece when wiring your inputs is this calm zero right here it doesn't really show up as may be necessary when you're i'm starting out but this is what is going to complete your circuit and so we always want to ask ourselves do i have current so i'm sending plus 24 volt to a button and i'm coming back to input 4 but i have to complete the circuit to this minus dc right here and that's going to be done with this com 0 coming down to minus dc so i am going to connect a wire from com0 to dc minus which is any of the right set of terminals and michael says i have a question that i need to look at oh what kind you know and this is something i really want somebody to help me with um i use a really old version of autocad david and i mean like it's really dated i need to do better uh another david is uh recommending skycad and i have heard of skycad but that's something i need to update myself on i probably i probably need to go to a training class and really get up to speed i've just kind of fallen behind on it there's a lot of great time saving ways of doing cad out there so yeah anybody who has good recommendations put them in the chat all right so we that takes care of all of our input wiring here so now we need to wire outputs and i'm just going to start by doing these jumpers to one side of each of our light and go into the minus dc and on these particular lights it um they um it doesn't matter plus and minus so i'm just going to arbitrarily start connecting on one side and just keep jumping so i'm going to take one wire to the right side of my light and then i'm going to take it and an additional wire to light two and then i'm going to take it and an additional wire to light 30. and i'll take it in an additional wire to light four and then if we look here all of these are jumpered together and then that wire is going to go to our minus dc so i'm just going to connect it to the right set of terminals let's see so it looks like the switches are sourcing to the plc inputs no rod um they are syncing and so if we can man man right that i should have had that link ready i'm gonna have to go dig a link out really fast um but no the way that way to remember it is if it's sourcing then you're gonna send power out of the input and then it's gonna go to the zero volt in this case we're taking power from the plus through one of our contacts and taken here and we're syncing it to the minus let me pop that yeah that actually yeah i should have had that one ready let me find a link here to a sinking and sourcing video that we have that kind of explains that and kind of actually yeah i should have printed that out because this really helps you understand um what not only what syncing a source it is but kind of some shortcuts to help you figure out which way to wire each one of them let's uh let's see sinking and sourcing there you go i checked that video there out all right so okay yeah i've connected all these to the minus and since we're at it these are sourcing outputs and it's really confusing because typically if you have syncing inputs you will have sourcing outputs uh rare that it actually yeah pretty rare it doesn't work that way so in this case these are the source of the power so we're sending 24 volt out of them and going to our lights also yeah rod um you definitely um you want to check out that video because what i just told you about syncing and sourcing is for allen bradley it's also for many others but there are some plc manufacturers that do the opposite some of them do opposite on just the output and then if i recall from that video there was actually one manufacturer that swapped the terms even on their same model plc as they go through a manual so they are very confusing terms so that's why i always like to see a diagram just to see how exactly we're going to do it but okay now we're going to connect the other side of these lights so light 1 goes to output 0 2 to 1 and they're just going to sequentially go up so mainly i need to get that first one to write light one is going to go to output zero let's see looks to me like the input module is sinking to the negative the power supply yes rod you're correct yeah so they're they are syncing inputs yes all right so we're gonna go here all right so light one is going to go to output zero and then light two just going to get an output one light three is going to go to output 2. and finally light four is gonna go to output three all right yeah kevin's also recommend an e-plan here i hear lots of good things about eplan um i have never actually played with eplan but i know it is a very good one and yeah i probably i probably should just get some of them play with and maybe uh maybe yeah do some upgrades to my cad drawings all right so we have now connected light one two three and four to all their outputs but we haven't actually powered outputs and again this is something i see a lot as people leave out these comments now here's one thing to be really cautious of on this as a lot of people will say well if you want syncing outputs then you hiccup you hook up cm0 and if you want sourcing you hook up cm plus cm i'm sorry if you want syncing you hook up minus cm0 and if you want sourcing you hookup plus cm0 no that's not so this um is a sourcing output module so we're going to need to hook up definitely the input um i mean plus 24 to c to the plus cm 0 but we're also going to need to hook up this minuscm 0 right here because if you don't connect it you actually you'll see your outputs glow slightly when they're off i actually have a video on that man i just need to have a i should have had a list of um links ready to go here let me see if i can find that one really quickly well not really quickly so i will if somebody um really wants that i will try to find it later let's see alex if you were using proximity switches instead of push buttons you are the proximity switches would need to be pnp based on your wiring correct you are absolutely correct um in that case yeah pnp is going to send out plus 24 to the input npn is going to take it to ground so yes in this case we need a pnp type sensor to connect to these but okay so next i'm going to connect the plus cm 0 to our plus 24 and our minus cm0 to the minus also i do have a close-up of this because i just thought about it you can't really see the bottom of this plc just to give just to make sure we have a good idea of what we're doing here now here's a close-up of the bottom of this plc and so light one we hooked to output zero which is oh dash zero zero light two went to one light three went to two and light four went to three and now i'm hooking plus 24 volt or the left set of terminals on the trainer to the plus cm0 and i'm going to hook minus 24 volt or zero volt from the right set of terminals to the minus cm 0. so i have my plus 24 volt going to plus the m0 hey we shut that off and then they have the minus cm0 going to the minus okay and that covers all of our wiring and i know it looks a little messy but honestly i will tear this down for another this may get torn down and rewired four or five times today after this live stream to do some videos now one thing i am going to do and i actually don't recommend doing this normally itself i want you to be able to see everything is i'm going to relocate this plc to the front of the trainer also i didn't actually mention yet um we do need to connect plus 24 volt and the minus 24 volt to power the plc this is already done on your trainer and in this case i've already moved that power up to the front side here the other way so i'm just going to snap this over here that way i don't have to spin the trainer any during this oil there we go so yeah final connection is we're going to hit -24 volt there and plus 24 volt there put the power well thank you sparrow automates yes i'm glad you like our work and yeah yeah it keeps the keep the recommendations coming on the cad software because i'll probably look at these a little later because yeah like i said i need to update it now if man that did not snap down oh i got a wire behind it sitting here trying to jam the wire into it that's why it wouldn't snap down now one thing i'm gonna quickly well i'm gonna hopefully get this plc mounted i don't know what's going on here but i am oh yeah i got some wires in the way you know we just keep jabbing the wires there we go okay now normally this does come with a program in it and i'm going to download this just so we can check that my um that all my wiring is correct so i'm going to go over here to um connecting opponent's workbench oops i should have already had that open and let's see that one right there also um while we're at it these programs are available for download oops i'm running version 12. um if we go let's see it's another good link for you sample programs yeah all of our trainer plc programs are available right here at the sample programs that's going to take you right here and the these are the standard programs that are in all our plc trainers so you can always take them and look around and play with them and maybe learn a little something but for this one we are going to download this program into this plc with having to use different types when referring to syncing a source and when talking to someone over the phone 5 diagram we call it by the long name like sourcing a b syncing and vice versa yeah and you know those terms are really confusing i'm not um 100 sure why we haven't come up with something a little easier or some way to clean this up a little bit all right looks like we're getting booted here or what are we waiting on soda probably should look to see i don't even have this configured right let's see what plcs are out there yeah it's 14. so there it is it's ready to go well what's it waiting on there it goes now i'm going to get a warning on this and actually yeah i'm getting ready to put a video out about this warning but the default plc program ip address is 192 168 110 and i have this set for 14 right now because actually i went ahead and um i set up a uh control logics just in case some questions came up or somebody said i don't think it works that way i already have all these programs downloaded to a trainer back here that um is a control logic and it's set to 10 so we're going to get a warning here in a second or maybe not yes see this is the warning you have to be really careful that you don't accidentally click yes because you're thinking oh yeah we want to go to run mode but this warns you that my ethernet settings are different and so we're going to click the no button here because i'm going to leave them the same and we'll wait a second and it'll be ready to go to run mode and while we're waiting on this well actually we don't even need to wait but um make sure you've hit that subscribe button and like this video because yeah we're hoping to do some more of these and yeah that way you get on notifications on them but all right the way this program works is if it's wired correctly when we hit the green button the green light will come on when we hit the yellow button the yellow light will come on when we hit the red button the red light will come on when we hit the blue button the blue light will come on and then if we switch which one it'll sequence through them i i didn't even think about it this is another version of a sequencer but um i don't want to use this one so we're gonna we're because we're gonna do it from ground the ground up but okay so that tells us that all our wiring is good and we're ready to start writing some programs so we're gonna start well i'm gonna disconnect here and we're going to create a new program and let's go back to our studio 5000 and our first one is a counter type so this is the program we're going to be making and so i am going to just call this one let's just call it sequence counter and if we go to controllers and in this case we have a micro 820 and it's a 2080 lc 20 20 qbb and we're going to select it and add to project all right while that's loading up jack is asking is it possible to use one hmi to communicate with three plc's at the same time my idea is for creating three screens on hmi each screen control one absolutely that's possible and that's not that uncommon a lot of times you you may have a um it may have a larger semi-assembly line or maybe it is assembly line that really the machines are they're individual machines but then they've been integrated to maybe pass parts back and forth or something then in those cases you could easily have a networked line of you know two or three maybe even 10 plc's and they all go to one hmi for the operator so yeah that's really common and yeah that would work just fine all right so in our program the first thing that we desperately need to always remember to do is to set up that ethernet configuration and if you're using one of our standard trainers then it's going to be 192 168 110 with a subnet of 255 255 255 0. now in the case of mine since i have that one back there set up the compact logics for 10 minutes set it at 14 and then we're going to create a program so we're going to add a new ladder diagram and you know and actually we're going to create two programs because we should segment ours a little bit because that's something we definitely noticed in my first program is that i had 300 rungs in one in one single um routine so i am going to rename this one to outputs and i'm going to rename this one to sequence now this is something that is different between studio 5000 and the connected components workbench is in this case all programs are executed in the order that they're listed so let's say we wanted sequence to execute first then we would just drag it up here and now it's going to execute sequence and then it's going to execute outputs and then it's going to start over whereas in studio 5000 we have a main routine and if we right click our main program and go to properties we can see our main routine is the main routine so it only executes this routine right here and then we can use the jsrs or other means to go to the other one so in this case i've done something that really you should not typically do but i did this say that if we needed these samples we could run them quickly is i have here's my outputs and then i have the different methods of sequencing where we can just switch them on and off as needed but in this case they are actually all executed and if we wanted subroutines we'd actually use user defined functions and i guess i could do it that way but no no let's let's stick fairly basic here so in this case we're going to be using a counter to run our sequencers so we're going to open that up well hey christian from bolivia didn't open okay and in this case we're going to use just a really basic counter so first i'm going to drag down instruction block and then if we just start typing ct you're going to see the counters that come up you have a count up counter a countdown counter then we have the up down counter and we're going to use the ctu up counter and i'm actually actually let's leave this exactly as it is and then we're going to need some conditions to make it count so i'm going to bring down a wrong and our first condition was that button 3 would make an index if it was in step one or in this case step zero so we're going to go to our i o tab and then we're going to i wish somebody explained to me i'm not sure why the outputs come before the inputs but i always almost do that and actually it's input four so input four is connected to button one next let's go ahead and label these while we're here so this is our green button this is our yellow button red button and finally our blue button okay so we're going to use the green button here now we only want now one thing we got to think about is what is the first step of a counter counters do start at step or accumulate a value of zero so we will have a step zero there's nothing wrong with that but we only want this button to work when we're in step 0. so we're going to bring another instruction block down in front of it and we're going to be looking for an equal statement now we talked about in a few videos because if you're in studio 5000 you're going to want to type equ and you're going to get nothing and that's because right now i am in the standard they call it the standard theme but look in a second but mainly in this case we've got to hunt and find the equal sign i guess can you hit equals yeah we could hit the equals symbol and it would bring these up now if you're more used to studio 5000 yes the default theme up here we're going to switch to the logix theme and then we'll go back in and now if we double click on this we can type equ which is what we're used to seeing in studio 5000 and we can bring that in all right so now what do we need to put here well in st this is one of the differences in connecting components workbenches we don't really have a dot acc file per se okay um we have um you assign it things so right here what i'm going to put is i'm going to make this sequence number so i'm going to double click here and we're going to create a global variable called sequence let's see am i going to create a new program each time yeah we will so we're just going to call this sequence number and it will be a dent and so this is now going to be the accumulated value of this counter so what i'm going to do now is i'm going to copy that let me right click that and copy that way you can see what i did and we're going to paste it right here and i'm going to say if the sequence number is zero and why is that not showing up this green button oh that's right because i just i just installed version 13. and can somebody in chat tell me where really quickly where is that you make descriptions show up is it over here i know it's somewhere is it label that doesn't feel right let's try it anyway that is not it my descriptions aren't showing up and there is a button that i have to change somewhere because mainly yeah i need to see that this is the green button see i can mouse over it and i can see the comment i don't know why they do this by default hey is this one up there you go okay so where am i actually let's make sure we understand how to do that this is what it is is right now if i mouse over this i can see that i have the green button but i i can't just browse it i i really here's you know there are some quirks about connecting components workbench and i really don't know why they did them but if i right click anywhere but an instruction and i go to properties oops no where do i need to right click i was just there there it goes and i go down here to variable information see right now let's name an alias i want is it name and wiring man i still can't figure it out all right somebody's going to help me i'm not remembering um how to get my stuff viewing really fast i forgot to close it after i do that it feels like this is not exactly way here what do they call this comment somewhere you can put the comments on because i have it um in studio if i in my other version of studio 5000 i have that already set up name and wiring name name and alias view well that's going to make it difficult display common oh it's untrue why is it not showing it then let's throw that on close it and open it back up well in the theme i usually have it um even in the logics theme i usually show the comments now this is i just installed version 13 though no the theme doesn't um seem to do it all right now this is usually where is it because i do know by default it doesn't show it which was kind of always strange display wrong settings well let me go ahead and i have studio five we can switch gears pretty fast on this i have um connected components workbench also on the base computer let me just look it up yeah i'm not remembering it's probably under options ladder diagram all right well this is the same stuff you can get to over there name name and alias name and wine where are the comments well we're just going to press on here in a second hold on just a second let me check it over here what i'm doing i'm it up here we can see i um so we're running a image here that i just installed version 13 on so let me switch it over and this is my base computer which i use is usually um to figure out if there are problems but i thought let's see what it looks like here oh we got some smart guys in chat nobody knows how to do this pretty i know it's something simple i just can't think of what it is apparently let's see let's just bring something down and we go to a global tag you know wait a second i i usually put the info right here i've got in the wrong spot i've it's the hey i usually put like green button here i think i did i put it over there oh it did no here so this is a little bit different connected components workbench i really don't know whoops what comments exactly are for because aliases are more of your comments or descriptions there we go now we have a green button so let me go back and take these out and move these over here yeah well rod what were you so slow on that for you're right i usually do two um i just uh when i was sitting here talking i sat there and put them in the comment column all right and while we're here these are our lights so this will be the light one what's cool is in an alias situation you can have spaces or anything connecting components so they really do work just like well actually they're a good mix this is a good let me put these in by two [Music] 3 i like 4. all right and mainly here we want the green button what's cool about this is let's just copy and paste that real quick is i can type in underscore i o and i could go through all that and find that but in this case i can type yellow light actually yellow i'm sorry yellow button and there it is so the alias says in this case it is kind of an alias because you can type them in whereas descriptions in studio 5000 you can't i see right there's a visual there is a tag visual when you right click the tag hmm not sure what that means right but okay this gets us back going sorry for that delay but all right so in this case if our sequence number is zero and we press the green button then we're going to count up our counter so that takes care of getting us through the first step and now what we're going to do is oops we're going to put a branch in the right place and then we're going to copy oh that's right drag that there drag this there and then we're going to copy this equals down here and actually we can just copy this green button down here as well drag it over and in this case now if we're in sequence number one and we press the yellow button then we want it to count because that's what i said right let me let's go back to our studio 5000 let me make sure i'm yeah counter yellow button okay now in this case through the red button we want to have to hold it for one second before we before it goes on just i don't know i just thought it would be nice to add a little something to it so we're going to add another branch and then we'll copy the equals and in this case whoops yellow got some craziness going on there what did i do probably my copy and pasting that looks fine well here i go doing a live stream right after i update the version 13. i guess i got a little bit of tweaking to do but okay that is the yellow button but all right so in this case though we want a timer here now here's where i actually in this case i would probably put it on an additional wrong so if our sequence equals 2 right click on the object go to properties oh that's right and i was messing around with all this stuff and i ended up changing a bunch of stuff didn't i thank you all right i understand what you're seeing now rod and thank you david thank you for getting me straight there okay so in this case if we're on sequence number two and we have the red button ah same thing there wait there's a global there is a global place to do this where is it i can click in the right spot there we go we want that to be name and alias and now i think just every time after this now it'll show name and alias each time all right so we got that and now we want a timer so we are just going to use a t-o-n now this is if you're in the logic's theme you can type t o in and in this case this is one this is kind of one of the cool things about um about connected components workbench is the way they use timers is one i could put a variable in here or i can simply put t number sign one s and that's going to be a one second timer i mean i can also put in t number sign 1000 ms and that would be the exact same one second timer so i really do like the way they do the timers and then up here we're going to look for the q bit in this case the qubit is very similar to the done bet so t o n q bit now here's something i see i was waiting for the right spot is i see this done often at first i can add a description to this so that's one thing i could do is i could make this a little more descriptive because right now what is ton underscore one dot q it's not really clear a lot of people don't know is it defaults to these names but you can change them so if i double click right here right there is the instance name so i can put red button delay okay and now i know it's one thing i don't like is it doesn't automatically change it here now we've got to go and type red button delay whoops didn't get it right red button delay dot q but this is much clearer now why do i have a triangle there oh well i'm glad you didn't learn that rod yeah um where am i why do i have a triangle here does anybody know t what am i missing t number sign 1s that sure looks right let me just hit the build button on this what is that maybe i'm missing something i know everything's fine i'm not sure why it's showing a triangle here referring to undefined variable well no yeah it is an undefined variable because we just wrote that out so okay maybe they'll come back to honest i'm not sure now here's one thing i would do here is while this will work functionally fine i actually probably would add this red button right here just for clarity i don't know i could go either way on that this does nothing has zero functionality because obviously the red button needs to be true for this timer to start but if i was looking at it troubleshooting and i'm looking for an input it might make it a little clearer that the red button is what i'm waiting on instead of having to chase this down okay so that takes care of that one and then finally we're going to have a blue one so we're going to add another branch whoops come on now why can't i there there we go below and we're going to copy the equals one more time and this time we're going to be looking for three and actually yeah we are going to do it this way and this time we'll look for the blue button all right so that takes care of that and now what we need to do so that is going to index through these in fact yeah let's go ahead and finish our outputs and then talk about how this works so basically if we're in sequence zero i want the green light to be on one i want the yellow light to be on two i want the red light to be on i think i'll get one of those off green yellow red and blue so those are what we'll want so i'm gonna go down here this output one and we're going to if the sequence number equals zero we're going to output light number one all right we should be able to just copy and paste that and so in this case if it's number one then we're going to go to number light or to light two and if we go to number two like three and finally three number four okay now this is partially going to work but let's go ahead and download this and talk about exactly what's going on here while we're downloading if you could take a moment to hit that like button and subscribe to our channel button our channel button probably need to stop and drink some water on this and subscribe to our channel then it really helps us out a lot all right so rod what do you think about it on um a b compared to non a b on code sus do you think they're similar enough i hear i hear opinions both ways on that um you know there is not a free version of um studio 5000 emulates actually i would recommend the connected components workbench that we're using right now because it does have a free emulator right here so as soon as this gets done downloading i can quickly show no i'm one thing i've noticed about the emulator is well let me change back to run node uh one thing i've noticed about this emulator is it it doesn't play well with studio 5000 or something and i'm not sure what but right there's the emulate button and here is kind of a miniature micro 850 plc so you can hit the power on button and i'm going to get an error on this and this is because i am online with studio 5000 and i've noticed that that um some issue i get that some issue i get but yeah if i close studio 5000 the emulator would work and you can download to it and yeah we could sit here and just hit these to simulate inputs so that would be my recommendation in place of studio 5000 emulate but all right so we have a green light on now so if this is right when i press the green light we should get the yellow light on and okay looks like we have a learning opportunity because it does not work so let's go into our program and figure out what is going on and let's see sequence can oops well let's get back over here all right all that looks right come over here and we press the green light it's true ah so i did not put in a preset right here and it's not gonna so yeah let me just go offline and i'm not gonna worry about figuring out the exact step in fact i'm just going to put a hundred in here oh or y'all that's fine i'll put a thousand in there that's because we're going to reset it externally in fact that's why i wanted to download this so we could see you know some options on that so download this again oh no it was in run mode i was not now but um was it are you right was i um not in run mode there oh no i was in run mode but no the issue was the the set point was zero pretty sure well let's find out here so we pop over here and i hit the green button all right now the yellow button illuminate or the yellow light illuminates so now if i hit the yellow one the red should illuminate now the red button if i hit it is not going to illuminate so we can sit here and hit this and it's not going to happen because we have that timer on there so i hit it for one second and we're going to get the green now when i hit the green button you're going to see the green light go out and that's the next thing we need to work on is now if we go over to our program we are in sequence number four well we only had steps zero through three so four is not an actual sequence number so at this point if you were actually on a machine you could either cycle stop it so that maybe an operator has to walk back up and do it again or in my case i'm going to make it start all over so i'm going to go offline here and i am going to add another rung and then we are going to put this equal statement so i'm just going to right click copy it and i'm going to paste it here in rung three and if it equals four actually you know in here while i don't believe there's any way it could happen this shouldn't be an equal statement this should be a greater than or equal so a geq now it should never be able to get above it but that's a good thing to do i think so you can't think of why you wouldn't want to do that right now and so when it is we are going to reset that counter now resets work differently in connected components workbench if we were in studio 5000 then we could simply use an res instruction right here and reset our counter but in connected components workbench the reset is actually part of the base instruction so in this case we're going to need to a tag here for this so i'm going to call this reset sequence oops sorry i got to create that and now i can take that same reset sequence copy it and then right here we're going to use an output energize to that reset sequence and we can take this out and so let's download that all right so now it's showing a green light and i press the green button we go to a yellow light i press the yellow button we go to our red light i press the red button oops we've got to press it for one second now so i press and hold that we get a blue light and then finally when i press the green button now it's going to go back to green and we can sit here and do this all we want all right and so now let's look at this in the program make sure we understand exactly what's going on so we have a counter here and these are the conditions that we will count up with so right now sequence number has to equal zero so in this case sequence number is equal to zero and we can see that because it's red on the right side of it this case it need to be one in this case it would need to be whoops get off two and three so these three lower branches are all false this is the only true branch we have so we press the green button and you never actually see it go true there do you you saw that really this turned red and all of a sudden this was blue that's because the scan cycle for that one split maybe two three millisecond scan i'm not even sure what the skiing time of this is that was true but our pc is not going to update that fast so now we're in step one so we can see that by the red here and it's going to look for the yellow to be true so this sequence number here is the same as this sequence number here here here and here they're all the same tag so we press the yellow button and that shifts it down to here now here if i hit the left i can do it quick enough yeah so you can see the red button indicating but since i'm not holding it for a full second it's never going to go through because it's waiting on that delay so we're going to hold that and now it shifts to the next one and it's looking for the blue and we go back to the beginning and this is pretty much what we saw in my first rslogix 500 program is me sequencing this way but now let's talk about a variable of this that we can do because what my issue with this is and really i saw it in that program but i couldn't come up with exactly how to fix it quickly during the last live stream is this is almost readable here i mean you can see even here we got slightly scroll down and but what if we had 20 sequences here can you imagine the scrolling and you know as you're scrolling you're navigating it can get to be a really big headache let me catch up a little bit on the chat you know i don't have a whatsapp group um i'm surprised there isn't one out there but yeah though no we don't have that let's see rod on the emulate issue i have used the hmi to simulate a piece of hardware or control sensor yeah um i actually need to do a video on that because that's a really neat feature let's see yeah yeah it does require a little bit but yeah i should put that on there because you can do some pretty neat things there as far as learning now still in the end i want to grab a hold of some wires that just you know i think you learn a lot a lot faster but hey if you don't have any or you need to simulate something you know when you're on an airplane or somewhere else that that's a great alter well not the hmi but yeah the simulator it does have some advantages but okay on this is this can get to scrolling a whole lot if it grew much also i don't like that this timer is stuck down here and i did this one first exactly like this because this is similar to what i see and it's similar what i did in my first one but something that a lot of people don't know you can do and i hope this works in connecting components because i did not actually test it yet is you can have multiple counters to the same instruction now this should work with connecting components i can't see why it wouldn't but if we look at our second studio 5000 example i've done this so here here are the branches exactly the same as we have in connected components in one counter but i can break this up see this is sequence counter this is sequence count actually counters plural because this is a different one sequence counters plural sequence counters plural sequence counter plural so i have three count up counters going to the same tag and i think this makes it easier to read if you're troubleshooting because really okay sequence step zero one two and most importantly i can combine this timer now into this really nicely so that when i'm on step two and i'm trying to figure out what is wrong it's going to be really clear that either it's waiting on this or it's waiting on this i'm not going to scroll or search or anything like that to go find it so we're just going to modify our connected components workbench program now to be like that and this shouldn't be difficult we should be able to well we gotta we got some obstacles here is first when we did the ton you notice i renamed this well i haven't done this one yet and here's where yeah it's going to become much more important is i can double click here now oh i got to go offline yeah and i could do run mode edits but i know a lot of you are using uh the free version so that's not an option so i'm just going to go offline and do all my edits that way but if i double click on this and then the instance down here i can name this my sequence counter and man this does work i'm not sure why we're getting this occasionally but um it works fine this is version 13 and yeah this is my first video with version 13 so there may be a few things that i'm not aware of on it all right but so now our counter is called sequence counter now i'm going to highlight this rung and i'll right click it and i am going to copy this rung and i'm going to right click and i'm going to paste once paste twice and we're going to paste a third time giving us four copies of that same wrong and even now it's really difficult to figure out where you're at because this is slightly large for this um with the font size and everything i'm using that bottom one's getting truncated but okay notice when you create those like that oh man why did somebody tell me i spelled counter wrong oh you guys got to keep an eye on me we're going to fix that we're going to go down here to the first one which is actually at the bottom now and we're going to rename it to sequence counter but now i can go up to this next one see even as i scroll it's a little difficult to find it and i'm going to make that instance the exact same because i'm going to make this one counter and then i'm going to change this instance to counter and finally this one to counter so this is going to make them all address the exact same thing and now what i'm going to do is okay this first one is going to be for my green button or sequence number 0 green button so i'm going to highlight here and i'm going to delete that delete oops control z did something wrong there highlight there and hit the delete highlight there and hit the delete so that now is sequence one or sequence zero so now on the next rung i'm going to delete this one and then i'll highlight number two delete number three delete and then this one it's going to be number two delete delete delete and then on this one it will be the final one so delete delete delete all right now we have this ton which i didn't like stranded down here anyway so i'm going to copy it now i'll just right click make sure i right click that way you'll see exactly what i do now we go up here to sequence number two and here's where we're looking at that i'm going to put a branch in here i'm going to drag this in and i'll drag this in and i'm going to put that ton right here and i just think that's going to make it read so much better and make it where we can i think we'll make our troubleshooting a lot better so now we can delete this and if i've done all this right this should work exactly the same way so sequence zero green button counts sequence one yellow button counts sequence two red button after a certain amount of time counts and finally the blue button counts in sequence three and then sequence four greater than equal to should reset the sequence here's where it's always scary doing a live stream and doing this without any testing as i i feel this should work so let's let's give it a shot and find out well look at there unable to download we could do the build errors so red button delay q un declared identifier oh okay oh there you go again when it copied and pasted and maybe this does anybody know is there a way to turn this off because this does get annoying it says you're copying and pasting this it's always wanting to increment which i guess they're doing so you don't hit them with a bunch of duplicates but it's um it's a real headache so hit the build button let's make sure there's no issues now and we look good so we're going to download that michael is all our statistics still looking good over there well yeah i do need to you know while we're waiting on this to um download i do need to give thanks to michael my son um he actually makes all this live stream stuff work and that's all i can call it is the live stream stuff because he's just a genius at it so thank you michael for doing that and let's see we switch back to run here and david am i a master electrician so interestingly yes i am i have a master electrician that has actually never um used my license though uh you know we're a ul 508 a panel builder so i did end up becoming a master electrician but i have never actually i i i farm out all of um really the power end of our control panels typically because you know typically well one i'm just not a great conduit bender i mean i just just put it out there everybody's got things they're good at conduit bending is not mine okay so let's see how this works it should work exactly the same so i press the green button yellow light comes on i press the yellow button the red light comes on now i can sit there and kind of peck on this and nothing happens but i press and hold that and you're ever going to get a blue light and we press it again and we're going to do that again now because i didn't realize it was not on full screen but yeah green button shifts it to the yellow yellow button shifts it to the red that doesn't work we've got to have that for one second goes to green goes to blue whatever that color is and then we hit it again and it goes to the green so this code right here exactly the same as our previous code but i just i think this is much easier to troubleshoot later on i wish man and here's where i was going to create a new program every time and this is why and i will do that from now on is i would love to go back and look well i did create all the studio 5000 programs so we can't see it here is if we look at this one this is the way it was written but if we had 20 different conditions or 20 steps it would get really to be a pain scrolling this and coming back up and figuring this counter out whereas really breaking this up into the individual ones it definitely makes it easier all right alex asked an excellent question and i was sitting here thinking i was like i did not um i did not address the elephant in the room early on in this stream is what is your opinion on the sqi and sqo instructions in studio 5000 for sequencing well alex if you have been in our last live stream actually went through that one and i had a perfectly written sqi and sqo instruction and 20 years later i couldn't even figure out how to follow it i mean there is it is the most powerful set of instructions for programming machine steps it might be the worst nightmare scenario for troubleshooting machine steps well no i mean a horribly written program would definitely be worse but here is one it's just let me make sure i'm on the right one let's see yeah so my first studio 5000 program talks about that so opinion all right let's just put sqi and sql instruction problems there you go check that one out sometime it'll um it it'll it'll give you my opinion on but no it it it has tremendous flexibility and again actually i should i should address that a little bit more is i i see mainly instruct or actually mainly status constructors come to me too but students come to me and they're like hey i need to figure out how to program this with an sql an sql and i go through and i told them no this is not how you do this you don't want to do it here's how you want to do it and he's like well this is my homework assignment and that's the biggest place i see the sqi and sqo uses chapter 8 18 of the plc programming book had the sqi and sqo instruction and the instructors tried to teach it and then i mean instructors do contact matches like i can't figure this out now usually i can talk them out and talk them off the ledge and be like you don't want to do this teach the students this way but yeah i overall i don't like them and as i went through there and talked about is mainly that is not universal so it won't work in connecting components it won't work in an automationdirect it won't work in a siemens it won't work in a mitsubishi really the the sequencing methods we're going through today i think i can't imagine them not working in almost every plc out there and that's why i think mainly i chose these particular ones but all right let's go on to the next one and we will create a new program for this one we'll do some copy and paste and hopefully to smooth this up a little bit but um well no probably not but okay let's just create let's go offline with this one and we're going to create a new connected components workbench and while we're waiting on this to load up because it is a little bit slow to load yeah please take a moment to hit that like button and subscribe to our channel also yeah we so we do a newsletter at least one newsletter a week most of them are letting you know what the latest and um greatest yeah the latest and greatest instructions that we have out there are but if you go to any of our really any of tw controls any of its pages and just scroll all the way the bottom you're going to see where you can subscribe to our newsletter also occasionally have a promotional coupon like we're having in chat today which if you didn't know it um there is everybody who's participating in chat is put in the running for a 10 off coupon at tw controls or plc tools okay we are why are we still loading up what did i do that seems like a long long time i'll wait get in there oh there we go we are loaded up we're ready to go all right so again we're going to create a new program and this one is going to be sequence seal in and we're going to go to controllers micro820 and we're going to select the 2080 lc20 20 qbb and we're going to add it to our project let's see how william asked have you done anything with the powerflex 755 with an encoder and motion commands no i haven't um and this probably comes down to opportunity i don't work with a lot of powerflex 700s in general most of mine um i mean we uh we work with a ton of the powerflex 525s we go through them like they're candy but i don't get into a lot of powerflex 700 applications so no i doubt that'll happen now we have done some motion control on these and we're going to do a few more because we can do some limited motion nothing like the 700 but uh probably we'll um probably do some more with those but yeah yeah you know a lot a lot of our videos you know as we've talked about many times there's no real revenue source from our video so it's more of we have a control panel that's being built and happens to have the components that's how most these videos get made so unless somebody has us built something with a power like 755 it probably won't happen but all right we're in connecting components workbench and all right now i started the last one a little different because we were in the default theme here and i want to make sure we didn't get lost there is this is how the default theme works and if we switch over to the logix theme it kind of lays out more like studio 5000 does and so in this case our main task is where we're actually going to create our programs so we're going to right click main task we're going to create a new ladder diagram program and let's go ahead and rename that and we'll just call this our outputs although really we probably could cram down now let's you should have probably some organization so yeah we're going to do that and we're going to add another one and this one we're going to rename to our sequence and actually the same deals last time you can drag these oops that i can drag program one up and there you go now it's above i never played with this can i rename program oh yeah look at there so i could also rename this to sequence i don't know why i would need to also it kind of makes it look like you could add multiple routines here but you can't if i added another oh my goodness that has changed oh wow well i believe that's new for um version 13. i'm not sure here um but i tell you what we're uh if we have if we're not all fried later we may play with that let's stick with the way but this one was done which means we had program one program two i believe that's a new new feature for version 13 i used to or maybe it yeah wow so there you go i want to put that on the list to make videos on is um how that works and it may be that it does nothing different but okay let's not get too far off in this one we're going to be doing the seal in and of all of them this is my least favorite probably actually this is my least favorite between this and the latch unlike so now these work so i can't put them completely down but i would not do the seal in or the latch unlatch in this case and we'll talk more about the reasons a little later in it but let's just get this in there first so in this case we have a sequence seal in and we're kind of working down through here and we're sealing it in until the end and this is kind of our basic start stop circuit uh kevin asks what are your thoughts on structured text i like it because it's easy to copy code between platforms and you know this is actually my most common battle now before before i go any further with anything i'm saying i actually love structured text i love function blocks and i love ladder and the program i was i was going to go over before everybody asked for us to go through these from the ground up was one of my programs i recently wrote connected components that used all of them now my argument against what you just said about structured text is yeah it's easy to copy and paste but i'm in the end i am an old school i mean i'm an old-school maintenance technician that's what i did before i started tw controls i worked maintenance so my mind always is how do i troubleshoot it later on and i think that's where structured text falls down as far as working with field devices now at flat out you cannot do math or anything like that any more efficient than structured text and let's face it a compute statement and ladder isn't that structured text so already we you know there's a lot of sprinkling of structured text but my where i draw the line usually structure text is when we're actually dealing with physical inputs and outputs i think at that point you need to transition to something else just to make it a little easier to troubleshoot but okay so let's get back here and really we're gonna this isn't that much different than what we've done before as first let's go in in this case it's controller variables let's put in some description or some aliases oh i'd forgotten about this so this is a little quirky about version 13 is if you have because you notice i'm in the logics theme here i'm also in the logics theme here but actually i have closed it now okay but it doesn't audit i've noticed it doesn't automatically change this interface sometimes but okay output 0 is going to be light one and then output one oops it's going to be light two and light three and light four and then down here input number four i don't know why i'm not labeling those as colors up there but that's what i did in the previous one so in this case it's going to be the green light and then the yellow light red white and the blue light it's pretty much the exact same thing as we did last time and then we are going to need to create a tag whoops should have done that while i was over there let's go back over here we're going to create a tag down here and this is going to be our sequence and it is going to be oops why isn't it oh yeah that's one thing i i stumped on an another live stream that we were doing is you cannot name a tag the same thing as a routine is named which kind of can throw you because there shouldn't be any reason for that but okay sequence seal in that's what we'll call it and this will be a dent and now we'll go and in this case we're going to be doing it just like we did here so first we're going to be looking for the sequence sealant not to be done actually i should have done that a little different oh no i i did this one and here's yeah let's just go through it so over here we're going to use a reverse contact or an examine of open and we're going to go and find sequence seal in now when a lot of people don't know is that the end of this i can just put dot 0 and that's going to look at bit 0 of the sequence sealant and then i'm going to look for this green button so green did i really put light on that that is input 4. okay i'm sitting here just talking away and why did somebody correct me again yeah guys you can correct me i won't get offended these are all buttons these aren't lights button button and button okay the green button is what we need and that's right and it doesn't immediately update i have noticed that we just go off of it go back on i think you can also close the tab and open it back up the green button and now we're going to put an output energize here and actually we just escape out of this because we're going to copy this and we're going to put it right there and now what we're going to do is going to put a branch around this now this may look confusing right now but we're going to go through it when it's done and explain exactly how it works all right does that look pretty much the same as that yes it does so we got that one done all right now we're going to copy and paste this down and whoops actually i should have done that but once because we had to make a modification to this first one is now this is going to be that and then ceiling will be one okay now we can do some copy and pasting well that's got to be one a v okay so seal in seal in one now this is the second one is the yellow button and then this one is going to be the red button i'm gonna and this one will be the blue button and so this one was zero and one this one's going to be one and two this one is going to be three oops this one's going to be two and three and then over here yes same deal zero one two and three actually no i did something wrong there i can tell i did something wrong the seal no oh except i forgot that this sealant piece here all those are three okay so that takes care of that and then we're going to have some outputs here and so for the first one sequence sealant at zero it's going to turn on output zero one so zero and not one and then one and not two and then two and not three all right so first let's just download this program so we can see how it works sorry about that i had to stop for a water break didn't realize i wasn't downloading again okay well we're in run mode and our light is not lighting up so [Music] i have something wrong so let's go in here and figure out what's going on all right what do i got going on we're in run mode oh well okay well and then again it's always it's going to do exactly what you say but i sat there and copied paste it this is output 0 output 0 output 0 and output 0. so yeah that's not going to work so let me go offline and fix that hey and again you guys ought to catch me on these things because yeah one we are having a promotion in the chat which is probably a good time to mention that is that if you participate in the chat you are in a drawing to get 10 off a plc trainer or one of the plc tools simulators and testers and yeah it'd be really helpful because yeah we just sat here and stared at a machine that wasn't working so you all could have pointed that out it would save us a little time okay now we have a green light now this should work exactly the same so i press the green button the yellow light comes on i press the yellow button the red light comes on i press the red button oh i didn't put the timer in there so we got to fix that because immediately when i press the red button it goes to the blue and i press the blue and it goes back to the green so let's go and put the timer in and just yeah i don't want to shortcut this one too much no i got to tell you already and you notice i didn't spend a lot of time on the ceiling because after thinking about this this is one that i was brought up in the last live stream as an option and i don't think this is a good option but let's go through it and give it a fair shot is right here i forgot to put in the t-o-n timer so we'll drag that output energize and then we'll bring down a t-o-n well must think you know hey we you know something we learn from our mistakes though so i i get excited about mistakes i call them learning opportunities i don't want to make too many that are just like harry you're wasting a lot of time down there so yeah feel free to reach out be like hey you forgot this so let's see we want a one second timer there and then we're going to bring this down and that will be ton okay that should take care of that so let's download this oh well okay you didn't even see what i did there but i added a timer i wish somebody again i guess i'm kidding michael just brought me some caffeine because yeah i'm slowing down a little bit so he's like yeah you need to put a little pep in your stuff so yeah you didn't even see what i was doing there but um let me just show you since you didn't see it is oops it's getting back in there is mainly i added this timer right here so so the um this is the same as all the others we've had mainly this red button we want to be pressed for one second before we press on before we move on to the next step so i'm going to download this program well it seems to be taking a really long time to download well while we're waiting on that what all projects is everybody on right now is anybody any fun projects i'm always always looking to see what everybody's doing it's always you know it's just fun hearing about different things sometimes you get in your own you know your kind of little narrow niche and you don't you know get to see other things that are going on all right actually we failed to connect here let's go ahead and put this on let's see failed to connect which seems really weird because we were just connected so i guess this is one situation where we just try it again hmm all right it sure acts like it's not doing anything man we aren't oh my god hey so i don't know where i did it but we have a learning opportunity here [Music] is if you have watched any of my videos you know i always tell you when the one thing about connecting components workbench and i really i think they could work this a little better although there is a warning there but it's not really clear is when you create a new program it enables dhcp by default and if i go here to my um controller properties and i go to my ethernet configuration i just downloaded a plc with dhcp enabled hey michael can you get me the um the sim ipe over there it's right over there on that to your layup so in this case uh there there's a couple ways you could do it is one if you had a dhcp server handy then you could do it that way it's kind of a pain with um rockwell's bootp dhcp server i'll be honest i almost never get that thing to work but so we're going to use the plc tools sim ipe which is actually one of our devices and we're going to go to prepare address and it probably is in there but let's see ip address list there it is so that's what it was on 192.168.114. so i'm going to select it and then i'm going to go to assign address and we're going to use bootp dhcp and it is this top port and actually for the micro820 you do have to cycle power it only does dhcp for like one minute so we're gonna plug it in hey congratulations uh you just got somebody in the chat check it out they just got a promoted to a control system tech very good congratulations mustang is also studying for rslogix 500 5000 for future work that is awesome all right now i'm going to set it to static there you go there's always a learning opportunity and yeah i know everybody knows um i don't make perfect videos but we'll go through that and now i should be able to down oh no look i'm getting ready to do it again i'm going to make sure i cancel now is i just hit the download button but i didn't actually put that ip address in there actually i'm going to do this i'm going to ride this through this is actually a video coming out in a week or so but let me go and show you what happened for one and how we can fix it is i'm going to download the project values just like we've been doing oh boy laura's converting an old plc 5 trainer to be used with slick micrologix and compact logics we'll send a picture of it i always like to see um different trainers that are out there but okay now when we are naturally doing downloads the next prompt is normally do you want to put it in run mode except if your ethernet configuration settings don't match and it says here downloading current ethernet settings will result in a disconnection from controller continue with downloading of ethernet settings but you know i'm looking for the run mode prompt i hit yes so i'm going to click no here and what that's going to do is it's still downloading my program but it's not going to apply those ethernet settings and now it's going to say do you want to put it in run mode and we do but now let's fix our ethernet and it doesn't show it right now but if we'll click oh actually wait a second and it'll show it i think it does well we got to go back to our controller up here double click yet and now if we click on ethernet is it still loading there it goes just a little slow i'm choking up a little bit on the computer too but the settings in the project and controller are different update from controller what this is going to do is pull out whatever the plc configuration is so in this case i had it for dhcp but i'm going to click the button now and now i see we're configured and it's got it in there and now we can download next time rod's got an ip explorer awesome i mean i tell you what and yeah i don't like to get too salesy but yeah if you don't have one of these it is absolutely a lifesaver and yeah can it configure let me get a longer cord hey michael actually here's one is one we can plug into a device so i just unplugged the micrologix which remind me later i just knocked myself offline i'll be scratching my head and wondering why it doesn't work and i plug directly into a device then i can go to read unknown and it's going to tell me that one there's its ip address i don't know if i get this to focus in usually i use a different camera for stuff like this but this ip address is 114 it also gives its mac address it tells me that it's a 2080 lc20 20 qbb and i'll say that it's version 12 which can be really important when you're trying to figure out what especially steve 5 what version you need now one other neat thing you can do though is let's say we're just one maybe we're trying to figure out what ip address we should set our pc at or you know what is all what else on this network is you can actually plug it into an ethernet switch and i'm not sure what i was on this network um most the plc lab shut off right now but now if i go to read unknown then all right it's discovered five devices eight devices see i'm reading that top line right there hopefully that focus is okay uh so there is that micro 820 again but now i can hit the up arrow and it's also discovered well there's a second micro 820 which is actually in the control panel that you can barely see right there this is this compact logix trainer i set it back here just in case we had a specific question on it uh there's the power flux 525 drive right here uh there's another power flux 525 drive that i can't even think of where is right now uh what is that ah this is the panel view 800 right here and there's another panel view 800 up there and yes uh mustang is just asking is it compatible with other devices well yeah here's my um actually my pc desktop so no it's not just for allen bradley it's not just for plc's uh we we have people that buy them for like large scale camera systems you know configuring cameras trying to figure out what cameras are used uh pro i mean it can do printers it can discover anything that well anything that uses any of the standards now there are some things out there that are just crudely written it doesn't work great with but yeah it's it's an outstanding device for things like that okay but all right we got we're doing it we've gotten off on a rabbit trail but while we're here though let me let me at least put a link down to that just let's see actually here just go to plc tools which yeah i mean guys you're uh you're in the running for a 10 coupon here at plc tools just by participating in the chat so make sure you participate but all right let's get back to where we were all right i unplugged so we know that um okay yeah and i am knocked offline so let me go back online here did i download that program yeah i did because we just updated um yeah we updated the ethernet settings let me get back on but actually okay we had just added the timer so now if i press the green button it should go to the yellow light if i press the yellow button that you go to the red light if i press the red button one it doesn't but if i press and hold it for one second it goes to the blue and then the blue button takes it back to the green so it does exactly the same thing now my problem with this is overall what step exactly is this in and mainly i just i don't think this is very clean to troubleshoot now there's some things we can do to add to troubleshooting so actually because let me give this a fair shot one i just like having a step number like all our previous ones we have been able to look and say that we're on step zero step one well in this case it's we're on zero but not one or are we on zero but where are we and but we can make it a little easier is we can add a rung right here and i'm actually just going to copy this and we'll paste that what two times all right three times somewhere around there and we're gonna make this number one and we're gonna make this number two and we're going to make this number three and then you know honestly i'm trying to think does studio 5 i mean connected components does it have an nop instruction nop there you go no operation now if you're not familiar with a no operation it's just that it just does nothing but it's going to let that rung be true so i'm going to download this so awkward silence every time we download michael says i need to smooth out my um my plug for everybody to subscribe and like and do all the things so how can i pitch that better throw that in chat because yeah michael has little cute cards he throws up at me he's got this thing running really well back here all i've got to do is manage to do some programming on ccw he's doing the rest but okay we've got what happened there did i really just do that no i didn't do it again because it's we're good right here error or writing to well i don't know what just happened there well first let's see if i did that twice in a live stream that'll be really bad but okay we'll we'll get good practice of using the ipe no we're online um let's just try it again i guess um all right well i do not know what happened there but we seem fine now but mainly okay what i just added does help a little bit this right now we're whoops well it wasn't quite online yet it's almost there but okay right now we're in step we'll call it sub zero and the reason honestly i wouldn't do it exactly this way but what i find the reason a lot of people want to do the seal in is they don't realize you can mix bit instructions and number instructions so i left the opportunity to you know use numbers out of this but if i press the green button then the yellow comes on and now we can see that yeah all right seal in one and so what people say is that well all you got to do is look across something like this and you'll know exactly what step you're in and this is similar to what i did in my first program but i think i left a lot of opportunities out for troubleshooting and also it really becomes a bear if i want to insert another instruction in the middle and mainly because really to do it i have to shift all these down and i'm not going to do that i'm going to end up adding some crazy oddball bit in here to add another step in so overall i don't think that the seal ends still is a good way to do it so i'm going to leave that at that but there is a variation of it that i see and that is the latch on latch here which is almost exactly the same thing but in this case we're going to instead of sealing these in we're going to do these latches so let's just modify this and this is a really easy modification if we look at it compared to the seal end right now we're output energizing 1 cln0clm1 n2 and seal in 3 and then we have this stuff here in this case we're taking that sealant piece out and we're changing all those to latches now maybe somebody in chat can help you with this because i feel that i have never discovered something in ccw that makes this easy as if i'm over here in studio 5000 is if i want to change this to an output energize i can double click on the symbol oh come on now oh i'm online well that's okay i'll go into an edit i can double click here and i can bring up the dialog and either i can drop down and i can select an output energize or i can just type something else let me cancel out of that before i mess up if i'm over here in connected components workbench i just feel i've really missed something all this time because if it's a t-o-n and i want to change it to a t-o-f i can double-click right here and i can just type tof and i could change it but if i double click here i can't change it i double click one it brings up the variable selector and i right click here and i've never figured out that change instruction type is that what it's called in studio 5000 here let's go back to another and we right click here yeah i thought it was right here but i am not seeing it i thought i thought there was an option right here to change instruction type but all right maybe that was an rs 500 but mainly we can double click on it and i've never figured that out so in this case the only thing i know to do to change these to latches is to bring down a latch instruction why is it not let me bring it down even ah get there buddy hey all right we got somebody being a pain in the chat here all right oh good grief man there we go all right there we go sorry about that guys somebody's been a pain all right now i gotta think of where it was okay but yeah i'm trying to um trying to put a latch into this one why can't i not get a latch to even come down now what did i do watch oh it's not i'm gonna have to delete this first control x but yeah so this change instruction type here it should be there but i don't know why am i there guys but all right somebody and can somebody tell me though how do we do that we should be able to change that somehow from an output energized to an output latch but i've never figured out how so delete that control v and this will be number one and then delete that control v this will be number two and then finally we'll delete that ctrl v and that is number three all right we are gonna have to do a little oh yeah we're gonna add one more wrong but hold on let me get so now we can take all of these out oops i just did something wrong ctrl z i think i deleted delete the whole wrong all right so if we go to our studio 5000 the only thing this doesn't have is a way to reset i am going to take a little bit of leeway here is i'm not going to stay bit completely because i mean at this point why wouldn't you use a move to zero if really the blue button is pressed so we're going to change that last one from a latch to a move 0 to this whole thing here so we go down here right here we're going to have a move so i'm going to drag an instruction down and this will be a move and we are going to move a zero to sequence seal in all right so this is a latch unlatch example and i'm pretty sure that's right so let's download it i think you should be able to fix those chats now okay sorry about that guys we're having a little bit of a troll in the chat okay so we have a green light on and we press the green button it becomes a yellow light we press the yellow button becomes a red light and still that doesn't work unless we hold it for a full second and the blue one takes it right back so this does exactly the same thing as the seal in but this one i like even less in fact of all them we're doing in fact i almost left this one out except my my goal here isn't to tell you how to do it the right way the wrong way these are things we're going to run into out there but this is if there's ever one that i would never do in a plc program it is this one right here and the issue is it's too easy to make this unorganized that's really the statement i'll make about it i mean really if we had it like this and it stayed super neat and i mean even the top row makes it really nice where we can see what's going on it would be okay but i rarely see them stay like this they usually end up being a mess so but that is the two bit ways that you see which is going to bring us to really there's a couple more here and first we have this bit shift left and i was debating on skipping this one also but it is one that every that several you requested so even now looking at it i really don't like it but okay we can modify what we have for the spin shift left this won't take too much is yeah yeah let's stick with the program we're doing and yeah we can um we can make this work pretty easy so the bid shift left what it's going to do is if we're looking at our tag and we look at the values in it and we actually open it up let's just open any one of them up that one up then it has ones and zeros it the bit shift left is actually going to shift whatever is in zero to 1 1 to 2 2 3 all the way through what's kind of cool about it is it can even span different or multiple numbers so you can do this through a race i think up to around 2 000. now again i don't i don't particularly like this one either but let's go ahead and run through it really fast let's go all right one let's just take this back out and then in the end we're going actually we're going to look i'm going to take that one out whoopsie there there just get some of this seal and stuff out and actually all right it may have taken more than i thought to um modify this one all right seal in zero this will be seal in one this will be seal n2 this will be seal in three okay and instead of the light i mean instead of a latch yeah we're going to bring down an instruction block and honestly here's where i've never actually used a bit shift left and connecting components so we may be getting ready to learn something but one cool thing about is one you can mouse over and see exactly what you need data type wise and also we can highlight and hit f1 and it will take you exactly to the instructions with all the things you need to know but all right so in this case our source is what do we want to shift and actually we have the sequence seal in and it's kind of already nicely tied into it but well and even then we could change the name of even let's um let's go to controller variables let's go down and find sequence seal in oh why can't i not rename that one i'm offline let's switch that shouldn't matter but i did just start using version 13 so let me see i think that's exactly the same so it's not going to be that why can i not rename huh okay that was weird why could i not rename that okay so there may be an issue there may need to look at that later but all right i'm going to make this sequence bit shift left and then yeah i am going to switch back to the logix theme and they made a lot of improvements to the view this time in the logic scene but i have noticed a few things that i'm not sure exactly how it worked yet but all right now we're going to put sequence bsl now this actually this isn't going to exactly work though because we mouse over notice that the src or source says any elementary which means any bit that has i guess binary elements but notice that 1.1 by it that means it's an array and arrays can be a little confusing to how actually to specify in actually i'm really curious now um in um connecting components workbench okay well that's strange now i can rename this i don't know what was up but up here we have a dimension tab and so if we want it just a single dimension we can put 1.1 and that's going to make a one-dimensional array it's exactly the same size also i think you can do this let's see can i do 2.2 yes you could actually have the array start at 2. i don't know why you would want to do that ccw doesn't use a lot of the zeros usually things do start at one so we'll put it like that and so now though these are gonna have to have bracket one bracket oops that is something wrong there we go it's going to have to be in this format for it to work with the bit shift left so we're going to just add this and we'll do that to all of these all right this may have been easier to rewrite but that's all right we're going to get through it and again this is not actually all of these bit manipulation ways that we've done in this the latch the ceiling and this one they would not be my preference on how to do this but let's do enough of it that we can't understand how to do it so mainly if we're in position zero yep okay now so this now becomes also the one all right now the offset is going to be zero because we're gonna start at bit zero and the bid address is what we're actually gonna load into it and we're gonna make that zero because we're gonna shift whoops bit address well let's just jump back over here what is that maybe i don't know location of bit shifted into source location well maybe you have to create a bit for that no we can put false there we go yeah all right you have to remember that so 0 that is a number it is an integer false in connected components workbench is a zero binary number and then our length we're just going to make it the full double integer length of 32 and what that's going to do is it's going to shift all the bits each time that this happens and what's the easier way just to copy and paste this yeah so really we're going to delete what we have oh no we got that already though well let's just copy and paste one time then we'll figure it out control cv so this one will be so we have step zero we have step one and this will be the yellow button and okay in this case everything is there we just need to copy this put it right there and delete that and then finally we are going to do this last one different let me make sure how i did this in studio 5000 is yeah during that condition or if it equals zero then we're going to move a 1 into it and we'll talk about why in a second but all right so we go back here so yeah in this case actually this part is here but we're going to be bracket one bracket and we're going to move a 1 into it but we're also going to do it whenever what uh mustang where are you at uh what looks like function blocking ladder oh wow while we're while we're waiting on a mustang on that go ahead and put that in the chat this will be equals are you talking oh you're talking about the bit shift left well and you'll find that there's not a tremendous difference between function block and ladder i get people upset when they when i say that but you know the biggest difference is we could have reference points on function blocks that would shoot values into there and here you have to actually put out names that's really the big difference in those all right so then this will be this value if it equals zero now first let's see if this even works oh no we gotta make some more changes we got to go over here and you know i should use the fine for this i've never used to find often is a replace edit view device there should be a replace but i don't see looking to see if there's an option for find and replace but nope so we're going to type these in oh do you mean the instructions mustang do you just not familiar with like the bit shift left or okay oops why is it not like that it should like that oh oops that's a one not a zero hopefully i didn't do that any other times but okay that oh but that needs to be that down delete one two and three that should make us a bit shift left sequencer let's see how that works hmm michael how the statistics looking over there everything's still working right oh yeah yeah yeah we have 15 participants okay so now we're going to switch that back and let's do it well first let's just see if it works because honestly this is one i have not tested at all because i don't think i've ever used a bit shift left and connect to complaints workbench but all right so we press the green button yellow light comes on we press the yellow button red light comes on we press the red light or red button nothing happens but we hold it for one second blue light comes on we press the blue button and it goes back so it does work exactly the same and now though this one's gonna have the same issue for me that some of the others have is if we go and look now first this is clean i can kind of figure some of this out but mainly if i am not familiar with the bit shift left instruction and that is a i won't call it a specialty instruction to studio 5000 or rslogix or alan bradley or any of that but it is an instruction that's not necessarily in all of them so if you're not familiar with it all it can be a quick stumbling block and so that's why i would not use this one but okay now let's talk about some things that we would so first we had some real the basic counter and i got to tell you looking back i'm not so sure that the counter is not one of the best ways to do this even today i mean that was my way i did it my first plc program and i think it is pretty clean i would probably go this route if i was doing a counter after that we did the seal seal-in we did the latch on latch and we did the bit shift left which are all ones that i've ran into that i've seen i would not do any of them i mean i don't i just don't think they're good ways of i will call it reliably sync sequence and logic and ways that later people can troubleshoot i mean you may make it work but i don't know that i would ever do it now let's talk about ways that i probably would do it today is first we have a move binary so this is what we're going to do next and i think i think we'll start this one from the ground up we'll start with a new program somebody remind me put my own ethernet settings in this time and what we're going to do is we're going to create this program and talk about how it works because this is an important thing to understand what is going on here so one when we're starting off actually this bottom row wrong is what starts it off we're moving a 1 into our sequencer actually what is that sequence move binary let's just can i do that well yeah oh yeah we're online with this plc yeah we can do anything we want um let's go and monitor this and it has a value of one in it but if we open it up to the binary bits one means that bit zero has a one in it so next if we go there it's moving oops we're in my wrong place not too many programs open now next what it's going to do it's actually going to move a 2 in but let's look at what happens when we move a two in so this is looking for the green button i'm gonna go reach back here and i'm gonna switch switch zero oh hold on i gotta make that work um let's see this is sequence number six i actually have this where you can run different ones so move down here to sequence six all right now if we switch switch one or the what is the green button notice that when it moves that value of two it actually shifts to bit number one having a one in it and the rest of them being zeros and then we look at the next one we hit the yellow button it's going to move a four in and if we watch it when we hit what would be the yellow button that it's shifting that one to the next position or the two's position and then finally we're going to move an 8 in and that is going to move it to this 3's position so when we move these values it makes it where we can use these these are the bit locations to do the same thing we've done in the previous programs oops we don't want to look at that one that one's a headache all right now let's do this in studio 5000 i'm sorry in connecting components workbench and talk about how it works so i'm going to go offline and we're just going to create a new connected components workbench program and while we're doing that if you haven't already then please like and subscribe this video and also yeah we have um you know let's just navigate to one of these while we're waiting on studio 5000 is if you go to it well first if you go to twcontrols.com then you're going to see the subscribe there go ahead and subscribe to our newsletter and up the top you're going to find all of our lessons all of our lessons are free whether you buy our products or not so you can learn about how to get started in automation studio 5000 connected components workbench hmis here's the podcast right here that actually we're in right now how to build uof ul 508 control panels there's an rs 500 series motors drives conveyor trainers industrial wiring pids i mean the list just goes on and on and yeah if you click on any of these videos while we're just waiting on that we'll just click on one of them and then if you'll go in and hit the watch on youtube button oh and i got to do this actually because it's not going to give it to me because i am in i'm the channel owner but if you go normally then right below here you're going to see the subscribe button if you will hit that subscribe button we would much appreciate it it'll let you know when we're putting out new videos all right let's get back to it so here we are we're going to click the new button and we're just going to call this one well let's just call the sequence decimal all right and under controllers micro820 we're going to be selecting the 2080 lc20 20qbb all right and yes most importantly so i don't have to show you how the um semi-pe works again we're going to go to configure ip address and it's going to be 192 168 1 whoops 192 168 1 14 subnet of 255 255-2550 and we are going to create two new programs so new ladder diagram and we're going to create another one and this first one we're going to call our sequence oops sequence and our second one will be our outputs and then let's go ahead and open up our variables and this time in our alias column like we're supposed to we will put a few descriptions in so well i don't know why i've done it the other way every time but this time i am going to put that this is the green light i don't know why i was putting light on every other time but green light yellow light red white blue light blue light and then down here we're gonna have the green button the yellow button the red button and finally the blue [Music] man i'm struggling to type all this up button and then we need to create one variable here and we're going to call this excuse me our sequence number and it will be a dent all right let's open up our sequence and this is going to start looking like groundhog day because all these have the same rough structure it's really how we're tracking the sequence number and so we're going to bring down an examinative closed and we are going to look at that sequence actually just double click the sequence number and then we're going to add bit 0 to it right there and then same as before we're going to be looking for that green button on this first time so we'll go to our i o and we're going to look at the green button and in this case we're going to bring down an instruction block and we're going to use a move command and we are going to move a value of 2 into the sequence number and now we'll just copy that three times oops and so if sequence number dot one then we're gonna look at the yellow button and we're gonna move we're gonna double this every time and we have a video that actually goes through how binary works and that would be a good one to check out if you're not exactly sure what's going on there this time we're going to move a value of 8 and then to start our sequence over oops forgot that's the red button and then when we're in step number three this time we're actually going to move a value of 1 back in and that's going to reset it also we actually need an initial and we have we should talk a little more about that in another video but we need to get a one in this initially so we're going to put an equ so we'll bring down instruction block equi and we're going to be looking for the sequence number to be equal to 0. all right and then yeah outputs are going to look very similar to what we've done in all the other videos is we're going to bring let's bring down a rung and then let's bring down so don't need that let's grab sequence number dot zero and that is going to output the green light and we'll copy and paste that three times and then we're going to look for one two and three and that is going to do the yellow light the red light and and i just realized one thing i forgot was that timer so let's go to this red one here and we'll add a branch around it oops and we'll bring an instruction block down t-o-n and again we could name this so in this case we could make this the red button delay whoops why did not like that red button delay okay i don't know why i didn't like it the first time and then we'll bring this down and at this point we can look at the red button delay dot cue all right let's download this one did i put my ethernet settings in this time i believe i did let's see yes so we should be good to go this time so we're going to download this all right all right now i got the warning on the ethernet settings again dude what did i do wrong let's go look at that because yeah i definitely don't have to demo the ip again because i i love demoing it but i don't need to demo it because i made the same mistake twice all right it's coming back and we're going to go there and let's look at this ethernet all right definitely now one thing i haven't talked about i mean i get it you want to make something graphical so you can put this cute plc here but this may be the biggest pain in the rear thing is you have this double up arrow here you can use that and get this thing where you can actually read what is going on here but okay so apparently i still don't have my settings right i better oh i bet it has a it does it had a gateway address and that's what i forgot there you go so that fixes that but okay let's see if this works so green light is on we press green button yellow light is on we press yellow button and then we oop that didn't work that blue that did not take a second so let's figure out what's going on here we go back to our sequence well it didn't work all right what's wrong with this anybody anybody a chance seeing anything what did i do my mind's my mind's starting to fade here so you're gonna have to help me out more so let's see green button yellow button all right and the delay why did blu-ray pass that delay oh it's going to blow past that because look at here my set point is zero so it was exactly zero milliseconds of delay there so we'll go offline and yeah right here need to say t number one s and now we can download that and that should fix that thank you john um yeah you will yeah you're right no time or value um oops oh okay we'll fix that later yeah after a while of looking at this and it can all start crossing i was like this should work really fast but yeah if you put a zero um preset in there then yeah it's going to go right past it okay so let's see how it works now oh and again i did that without without showing y'all what i did so yeah what happened was right here i had no timing in this and that's why y'all couldn't figure out what was going on because you were sitting there looking at me staring at a screen you weren't looking at the actual screen but okay so now if we switch back now press the green button and we get a yellow light i press the yellow and we get a red okay now now that works and i press and hold it all right and we get a blue and it goes back and i would say that this actually this or the final one is the way i would do machine sequencing today mainly because i think this is clean you've got a really obvious we're in sequence number step one right now and all you know is a little about binary to figure out okay well step zero that's where i've got to be and i mean mainly i press the green button and it takes me to step two and i press the red button and i hold it and it takes me whoops i press the yellow button it takes me to step three or step four sorry but there's sequential enough steps that i can find exactly what's going on now there's a couple variants of this that that um you could do and i do not absolutely positively do not like this next variant but i do see it and so if you're going to see it then we need to talk about it is what you'll see people do is instead of using this move command they want to show i think they just want to show that they know a thing or two about math that's all i can figure out but instead of doing a move here they'll do a multiply and they will take the sequence number and they will multiply it by two now think about it a second first we gotta go to the bottom we start out with sequence number one okay if all that's true and we multiply we're going to end up with a two and if we do that again we're going to end up with well i'm sorry two we multiply we're going to have a four and four we multiply we're going to end up you see it's going to double it does they are right it does work but i don't think this is a good thing but let's go ahead and go through this so we can see how it works and my machine is really starting to choke i don't think it likes streaming and running virtual machines at the same time now what's kind of neat about it is you use the exact same thing so see sequence number times two sequence number here it is again sequence number times two sequence number and so we actually can just copy that only has to do all that copy that paste it right there delete that so this is a multiplication example of it so let's download this that we can see that it's going to do the exactly the same thing download with project values all right so now first let's see does it actually do the exact same thing so we have a green light i press the green button yellow light i press the yellow button red light that doesn't work i press and hold it it shifts on goes back so this does exactly the same thing i mean and my issue with it is is the previous way you just needed to understand slightly that integers are made up of binary bits now you need to understand that multiplying numbers by 2 will shift that bit and i do not think that this is good i do think that people do this just to show that they know how to do a bunch of neat math bo now let's go to the final one and this thing if i'm doing something today this actually probably is the way i do it is we're let's go actually let's start fresh let's go ahead and create one more program here and this one will be well that's what am i even calling this sequence move well i'll just call it a sequence move that'll work and what we're going to create well first yeah let me get through all this before well let's freshen my mind let me select the controller and get my ethernet settings in that's going to be 192 168 114 255 250 and then yeah there was a subnet that's why it's hasn't been matching up the other times there we go but if we go over here this is what we're going to be doing this time and overall i think this is kind of almost like the counter method but it adds a little flexibility and you know as you get doing this more you find that you rarely make the perfect sequence or the perfect machine program off the bat it takes a lot of modifications and what i like about this version is it allows for modifications so first it's just a basic decimal number so if the number equals in this case 10 and we press the green button it's going to move 20 in and here 20 press the yellow button it's going to move 30 in so it's stepping it up but it easily allow it easy allows that let's say i decide i needed something between the yellow button and the red button well i can make it step 25. so that's what i like about doing this is when you can kind of spread it out a little bit and i think it's still easy to follow so let's do this one so we're gonna make a sequence number and yeah the same thing so let's go make a few variables actually we need to create a few programs so oops a new ladder program um and actually yeah we're creating two of them okay and this one will be sequence and this one will be outputs and then we're going to create a few variables all right so output 0 is still going to be the exact same has been the whole time green actually well we finally got it labeled right green light yellow light red light and blue light and then our inputs are going to be the green button the yellow button the red button and the blue button and then we're going to add same thing as last time we're going to have a sequence number well if i can spell sequence you can tell the stream is coming to an end when all of a sudden yeah i definitely am not spelling very well all right and we'll bring down an instruction block and this will be an equ and we're going to be looking at the sequence number to be 10 and then we're going to look for the green button so green button and if that's true then we're going to use a move instruction mov and we're going to move a value of 20 to the sequence number and now we're going to copy and paste that and in this case if it equals 20 and we see the yellow button then we're going to move 30 to it and then if we see 30 and the red button now we've got to have that one second in there though so we're going to need a branch here one before i forget that needs to be 40 and we're going to bring another instruction down this will be a timer and this will be our red button delay and then we bring down that and look at the q button our q you know what i mean the q thingy and so john doesn't have to find it for me next time we're gonna put t number one s there and then we're gonna have one final one this will be a little actually it's not even going to be different enough to matter so we're going to copy and paste this so actual copy this one doesn't have the timer in it paste it here oops paste it in the wrong place and then if it equals 40 and we select the blue in this case we're going to put 10 back into it that's going to be how we cycle back through this so now we're going to put our outputs in and bring this down equi and that'll equal 10. oops i don't know how i got that down there take that out put that in and we need a green light so 10 20 is going to be the yellow light 30 is going to be [Music] a red light and finally oops 40 is going to be the blue lights you see the sheet and all right that's it and guys we are winding down here let's see how this one works no the other one on your computer okay so 14. and download with project values our final one and yeah that definitely has a problem because my green light's not on what did i miss green line sequence number equals zero whoops what did i do up here did i take it back to 10 ah i forgot so there's two equals here did i do that let me see how i did this oh yeah i forgot there's a bottom equals that if it's equal to 0 move 10 into it and i have forgotten that so last time i think actually no because i'm going to show you a couple of other things of why oops man that's that's another time also we lost connection to the controller we were going offline anyway so hopefully it doesn't cause us a hitch but we need a branch around that and we're going to copy this and we'll put it right there oops wow there that equals zero and download yeah michael says the giveaway is happening soon so stay tuned you definitely don't want to miss out on that all right so we still don't have a green light oh wait we're not downloaded yet okay now oh bad when you say now and um you still have a green light so i've done something wrong move ten oh okay copy and paste errors um all right this is only going to be an issue one time so i am no i can't shortcut it man guys as much i want a bit done with this this blue button should have been over here so we're going to disconnect one more time and you know that's why you gotta take your time and make sure it's right yeah i know i could use online edits but a lot of you don't have the you know a lot of you are using the free version so i don't want to see you i don't want to do anything that you can't do so all right we'll try this again so and hopefully this time when i hit the run button ah we got a green light okay so this one should work the same press the green button yellow light comes on press the yellow button red light comes on press the red button doesn't work gotta hold it for one second blue light comes on press the blue button and bam we're back at the green light now why do i like this one so much so let's take just a few more minutes just to talk about it is mainly what happens on the others like let's just pull one of them up we got a few of them still open like the bit shift left here even if all of a sudden i need to squeeze something in here so i need to take and make dot one do something else i'm gonna change this the dot two and i'm gonna change this to dot three and i gotta change this to dot four and i gotta do the same thing everywhere that every one of these is used i'll have to change it now this is not a big deal because we made a small program but it's still gonna be a tremendous amount of work whereas on this one let's say that oh what i want to say let's say we want an intermediate step that required because we do have switch one we haven't used that requires that switch one be turned so where i'm gonna put it actually i'm gonna put it between the yellow and the red ones so here's the yellow and here is the red so later on we decide that we need switch one to be switched for this to happen so i can go and just copy this rung make sure i'm on the right one and now i can put 25 here and i can change this to 25 and i have just inserted something in the middle of my sequence i can select was eight switch one well what's seven if seven is yeah seven is a blue button eight is switch one but yeah let's take a moment it should have a description on it and so yeah right there we're going to be switch one oops let's spell that right over the last switch one and that's the one we're gonna do so now we can step through but also let's let's talk about how we would add on the outputs because we we've only had one condition let's just make it where during that step so during step this new step 25 what do we want to do 25 will make all the lights turn on how about that so we go to our outputs and right now if it's equal to 10 the green light comes on so we're just going to copy this and then we're going to bring a branch down and we'll paste that right there and this will be 25. so now highlight that and we also want it on the yellow light so we're going to hit a branch on that and then we're going to hit a branch on this one and we're going to hit a branch on this one and let's download this i think michael's getting hungry he seems to be signing a lot more over there you got to feed him about every about every two hours it seems like and yeah we're past this two hour mark so he's starting to sign he looks like he's weathering away and the wind's gonna blow him away or something all right there we go so now let's talk about how this one works so we have the green light we press the green button and the yellow light comes on now we inserted something here this and now when i press the yellow light all the lights came on and then this still works exactly the same oh wait but what's our condition it's okay i mean i know it now and just jogged my memory but let's go see if we can figure out why this won't run because before i need to do that next and it doesn't work and i said what do we do we sit here and keep pressing the button let's go in and make sure we can understand how to figure that out so if we go here and we come back in then we can look at our sequence number and we can see okay we're at sequence number 25 and one i can look right here in our outputs and see where it's sequence 25. but now i know i can go to my sequence program and i can look here and i can find where is it equal to 25 and okay it's equal to 25 here and i'm waiting on switch one so now i will go here and switch switch one and that takes us to our red light which was our previous sequence that still doesn't work unless we hold it for one second and then finally press the blue button and the green light comes back on we start all over so overall this is absolutely the way that i think is the most versatile i think it allows for a lot of flexibility i think it makes it really easy for anyone whatever brand plc you're coming from to understand and also we're using really basic instructions here that every plc supports so this would be my choice but hey what would be your choice so we what do we go through let's just well let's go over here to our studio 5000 we look one last time what we went through so we had our basic counter and i say this would be my second choice and it's funny this is what i did in my first program what 25 some years ago and then we had this hybrid counter this other version of it and i think i would use it if it was a more complicated one because mainly we can break it up we don't have a bunch of branches and then i would not use the sealant i mean this hasn't grown on me any uh so i i don't think that one's a good one i would not use the latch one here i would not use the bit shift left mainly because it's a very specific instruction to this brand uh the move i know it's right up there too it would be top it would be number two or number three i would not use this multiply i think this is for people that are trying to brag about knowing how to do math and then finally yes i believe this move is the most flexible one and this probably is what i do especially on something that i feel that we may end up needing to add some steps or modify it just allows a lot of flexibility so i hope this video has been helpful michael am i forgetting anything um i am oh oh yeah we got a giveaway so michael has been tracking chat participants and who have you chosen i have chosen laura laura okay laura gardner is the winner so laura if you're still here send an email to contact us at twcontrols.com and we will get you your coupon code so i hope this video has been helpful for this very long oh gosh coaster bp you just getting in here with sql we did talk about that we also talked about the last one sqo nah not gonna happen man and we talked about the reasons for it so yeah hit the rewind button they call it rewind in youtube yeah but yeah we did address that in here but i hope this has been helpful which which sequence method do you like the best so put that down in the comments and again please hit that like button and subscribe to our channel and hey if you like this then give us suggestions how would you like for us to do the next live stream do you want to see something similar do you want us to go back to picking apart programs that we you know that are sent to us let us know in the comments until next time hey this is tim and this is amber of tw controls we run the automation store hey thanks for finding our channel here's a playlist with some similar videos and youtube thinks you'll like this video please like our video and subscribe to our channel and if our videos have helped you make some money and you're not using our products please consider supporting us on patreon until next time see ya
Info
Channel: Tim Wilborne
Views: 199,241
Rating: undefined out of 5
Keywords: Allen Bradley, Industrial Automation, Manufacturing, PLC Programming, PLC Training, Plc sequence programming examples, Tim Wilborne, allen bradley plc training, plc programming allen bradley, plc programming basics, plc programming for beginners, plc programming ladder logic, plc programming sequence, plc programming tutorial, plc programming tutorial for beginners, tw controls
Id: 8CGEp4LZGfE
Channel Id: undefined
Length: 179min 55sec (10795 seconds)
Published: Wed Jul 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.