Siemens S7-1200: Signal Modules - Wire, Program, Test

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey everybody sean tierney here from theautomationschool.com and in this episode of the automation show we're going to take a look at the s7 1200 expansion i o modules which are known as signal modules and the good folks over at siemens sent me in a larger s7 1200 with several modules and we'll just take a look at them quickly here the ones i have set up today are a digital input expansion module a digital output expansion module and then an analog in and out expansion module you can see right there the first one is an sm1221 the next one is an sm1222 and the last one is an sm1234 now what i've done is i've wired a bunch of stuff i had lying around the office here to these and let me just zoom out some and show you what we got here so this guy down move some of this other stuff in so what i've done is i've started with the ifm temperature sensors that we used in the last episode because i already had them out and they uh output both discrete and analog right so that gives me my inputs to the system so i'll have some of the screen inputs here you can see right in there i got two discrete inputs coming in from one from each temperature sensor okay and then i have my analog in right here so here's my two analogs from those two sensors now i've wired one as current and one is voltage and that's why you see i'm actually skipping input number one so i'm using input number zero and number two because as we'll see input zero and one have to be the same type so current or voltage so um those are my inputs now for my outputs digital outputs i just wired in a couple of leftover led pilot lights from one of my courses as well as the meters i use when i'm teaching analog you know the getting started with analog modules so i have you know zero to ten and four to twenty uh meters right here so we'll be using these two right here so those are wired you can see right here on the analog output you can see i have the first one i'll put number zero wired as current and the second one is wired as voltage the wiring here looks identical right but these um these meters are actually different inside so with that said that's the whole setup here again i'm powering everything with the side power supply which is great because it has you know over current protection circuit protection and all of that so um before we turn this all on let's see if we can't convert our program from our last uh s7 1200 uh project and uh see if we can convert it to this new controller and add these i o modules and configure them correctly so this all works so with that setup before we go over the computer though i do want to thank all our patrons over at patreon.com forward slash automation and now we can go over to the computer so uh here we are this is the program i actually just renamed it let me hide vmware i actually renamed it to project 03 underscore v16 the last one we did was o2 and the first thing i want to do i'm going to go to devices and networks i'm going to double click on the device here and i need to change this because this is a 1214 and that's not what i have here matter of fact let's zoom in on the controller if you remember last time we did this we had a 12 12 c so i'm going to go ahead and change this controller change device okay we want it 12 14. okay there it is now notice it's choosing version 4.4 firmware this is going to cause us a problem because that's not 4.4 firmware so in any case we will we will see what happens when it does when we try to download it what happens in the errors we get so let me go ahead and click on ok ok it's saying hey i'm going to close your ob1 okay here we are now look all the extra signal modules i can add to this unit because it's a bigger unit so it has more expansion capability so now the first thing i want to do is let me add the digital input this is an eight point input and let me make this bigger here and let's make this bigger too okay so let's go ahead and drop this in here okay you can see the 1221 right there okay next we have a digital output it's an eight point drop this guy right over here okay you can see it's at 12 22. and last but not least i have an analog and out so let's go look for the analog in and out and i'll drop this one and here you see 12 34. okay so far so good now the next thing i'm going to want to do is i'm going to want to set up the analog so channel 0 i'm going to have set for current okay now channel 1 you'll notice i can't change it that's what i was telling you earlier i had to wire the voltage to channel 2 so that i could choose it differently because whatever i set this to is what the next channel will be set to and again you can see plus or minus 10 volts there is no zero to 10 volt selection here okay so with that done let's look at the outputs i want the first one to be current and the second one to be voltage okay so now that i've set up my analog it's not really anything set up to do with the digital well except i could create some tags let's go ahead and create some i o tags here so we're going to be using the first two inputs so i'm going to call this di underscore and this is slot 2 so i'm going to call it 20. whoops 20. now this is my own my own nomenclature these are my own tags i'll call the next one 21. you can name your tags whatever you want typically your company will have a standard that you're going to go by or you know um a format that you're going to use you know so in any case let's do the outputs now so i'll do do underscore and this is slot three so i'm just going to go to three zero this is what works for me d o whoops d o 31. okay now let's go to the analog so high attacks analog n so i'm going to call this a i underscore let's see here it's slot four so i'll call it four whoops four zero and i'll call this one i'm not using it but i'm just gonna go in order here for one and then this is the other one i'll be using ai underscore for that should be good enough for our quick little program all right well speaking of program let's open up ob1 our main program here and let me make this smaller and you know what i want to do is when one of my inputs comes on i want to turn the corresponding output on so in other words if sensor one is out of range i want to turn on light one and if since the zero is out of range i want to turn on like zero okay so i just happen to have red and green but we'll just uh we'll just use those as um indicators that the corresponding sensor is on so let me come in here and we'll drop this right here and now let's go grab one of these outputs here and put it right there and we'll do the same thing again contact and coil excellent so this input will be our digital n20 and we'll go to digital out 30 and this one will be digital in 21 and we'll go digital output 31 and again as you know i'm new to siemens so if there's any experts out there who have some tips and tricks please share them with us we would love to know about them the next thing i want to do is i want to take the analog right i want to take those analog values coming in and throw them to the output so i can see them on the meters so let's go ahead and i think in this case i'm going to use a move okay this is what i would do in other controllers so i'm just going to do it here right i don't know if this is the best way to do it but it's definitely seems to work so i'll take an analog input 0. now wait a minute that's not what i want i want you know that's from the old program i want analog input 40 and i'm going to put that out to analog output where's my analog output did i forget to do that let's go back there okay uh-oh let's see yeah i did look at that so ao will do 40 and ao 41 okay so let's go back to our code and we're going to say ai40 goes to ao40 okay and we'll put another move over here and we'll take a i 42. remember we're skipping 41 because it has to be the same as 40. and i wanted to try both current and voltage and we're going to take this out to a041 okay so everything's looking good right well i don't think we're going to be able to download it because i think there's a problem with the firmware it doesn't match this i think is newer firmware what i did the 4.4 and that doesn't have that firmware in there so well let's try it we'll see what happens so i'm going to select the processor i'm going to click on download of course i will have to turn power on so let me do that and i'll be right back okay everything's plugged in and powering up so in a moment we should be good to go excellent all right so now let's start a search okay there it is it found it my 1214c now originally it had one 192.1680.10 as the address in the pre-show i actually download and test it to make sure everything worked so now it has the same address as my other s7 1200 has of course because i just converted the same program so let's go ahead and load it in okay look at failed failed what happened not a compatible firmware rev wow so we were right you can see the error here as well so how we're going to fix this well what i'm going to do here is i'm just going to go back into the controller change the change device and i'm going to make it firmware let's make it the oldest one possible okay so we want to change it to a but let's make it 4.0 okay we can see what will happen if i do that conversion but that's okay okay it's going to close and reopen the ob1 that's fine okay now let's try to download it okay we'll load it and finish okay and let's pull up our plc tags we'll monitor those okay great now we can see here on the analog inputs ten thousand and six thousand roughly right and the analog outputs ten thousand six thousand because i'm just copying that here let's pull up in the ob1 we'll take a look at that and let's monitor this guy you can see i'm taking whatever comes in i'm putting it right back out so let's go back to our tags here and we can also see if we look through here both of these are on the dl20 and 21 are both on because i'm below my range so i should be able to do two things here let's go back to ob1 and we'll scroll up here okay you can see both my lights are on okay and what i'm going to do is you can see i really get the temperature down in here this morning okay now you can see that going they were like at 64. so now they're climbing climbing climbing oops this one went to 80. that one's still at 78 so you can see i got one output and um if i bring the other one over 80 i get the other output oh this one already dropped down below 80. okay so i warm up both quite a bit over 80. and i got both my outputs we can come back here and we can see the code here see that's working now one of the things too is we can watch we'll actually see our outputs are changing on the meters our output's changing because these values are changing so let me let me go ahead and do this what i'll do is i'm going to turn the air conditioning on try to cool these sensors off really quick and then we'll come back and you'll see that these meters have changed dramatically matter of fact before i do that let me go ahead and zoom in on them and we'll watch them them change as the as they cool down these bottom two okay i actually put the temperature sensors right in the grille of the air conditioner and they're down in like 47 and 49 are their temperatures so what i'm going to do here i'm going to stop the air conditioner because it's kind of loud i'm going to go grab the units here keep your eye on the meters because i'm going to grab them and you should see the meters go up because i am holding on to them using my body heat to raise their values and i should get them all the way through let's see if i can get them under the camera here get them all the way through the 65 to 80 range and all the way up into the 80 plus range when their outputs will come on yep you see that and you can see the meter is changing too because we're taking that analog in one of these is current one is voltage and we're putting it to the analog outputs okay and we can see that on the screen as well in our code so with that that's how easy it is to use signal modules with the s7 1200 you just add them into your project download you know configure analog of course just download and go so it's really very simple to do and um yeah that's it so i wanted to say a huge thank you to siemens for saying i'm in can't wait to do more with them we even have more modules to look at but uh if you're looking at expanding your seven 1200 with some additional signal modules yeah it can't get much easier than that right so with that i just want to thank you for watching for subscribing please give us a like if you enjoyed the show i also want to thank all of our patrons over at patreon.com forward slash automation um you guys really uh help us and keep us going and i also always love to throw out that if you know anybody looking for automation training check out my website theautomationschool.com and let them know that i sent you here from the automation show and with that i want to wish you all a very safe healthy and happy week until next time my friends peace
Info
Channel: Insights In Automation
Views: 16,156
Rating: undefined out of 5
Keywords: The Automation Show, Shawn Tierney, Insights In Automation
Id: KISwX7R7aR8
Channel Id: undefined
Length: 16min 49sec (1009 seconds)
Published: Thu Sep 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.