How to Create Traces with Siemens TIA Portal!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back everybody to another scan time training video i know it's been a little while since our last video but we've been absolutely manic at the trading center over the past couple of months and we've been doing quite a bit of work behind the scenes developing something new which is to be released in the new year so stay tuned for that one well we're going to be able to look at the day guys is tracing inside of our plc more so the siemens s7 1200 plc using tiaa portal now tracing is a new tool that's available in a lot of newer plc's today whereas all the plc's didn't have this facility tracing is very similar to trends where we can actually see signals and how they are reacting with inside of the process but we can actually do this without using an hmis scada system as it's built into the actual plc programming software now i'm going to show you how this works and how we can set up our own traces inside of our plc to capture signaling inside of the process now before we get started don't forget to hit the like button comment below what you thought about this video and hit that subscribe let's get into today's video okay so i've got a project opened up in siemens ti portal let's go to add new device and let's add in our s7 1200 plc not all 1200 plc support this facility so we're going to be using an s7 12 14c which does and we're just going to add this you also have to make sure the version's also correct to support this facility as well i believe version fours support this whilst version threes don't if i just go and now detect and locate our plc there it is there click on this and bring the hardware into our software okay great so what we're going to do is we're going to go to our program blocks and i'm going to create a small test program one of the great things about tracing inside of our plc is we can detect fast signals and see how they work if we're just staring at the ladder logic and we're trying to detect fast signals and seeing them turn on and turn off we might never see the program react because they're too quick if you use watch tables same problem you're just going to be looking at the signaling and you might not be able to see it turn on and turn off but we can do with a trace so what i'm going to do is i'm going to add a little program in here which is simply going to be two signals two input signals that is going to control a latch and it will look like this so we'll use the first signal and this will be let's say m1.0 we'll use a second signal we'll call this m2.0 and we'll turn on q0.0 and we'll reset it with m3.0 latch on cue 0.0 let's give this some signaling so we'll rename this to signal 1 we'll rename this to signal to and we'll just call this our motor for example and we'll call this our reset there we go now what i want to do is i want to toggle these bits inside of the plc but if i right click toggle and turn it on and then i'll right click toggle and turn it off that's not going to be like a fast signal as such because it's going to take me time to toggle it on and toggle it off so what i'm going to do is i'm going to create another network and i'm going to put in our m1.0 here and i'm going to run it to a timer to you and we'll just add that into the plc we'll then give the pt a short time period so we'll give it 100 milliseconds so that's a quite a short time period quite fast and when the time has finished we will then reset our m1.0 so i don't have to manually go in and reset it myself so what will happen is when i toggle m1.0 this contact will turn on it'll run this timer for 100 milliseconds and then trigger the reset turning it back off again so if we think about the signal it's only going to turn on for 100 milliseconds and then turn back off this will then latch on our motor if we trigger signal 2 it'll turn on when we turn it off it'll also latch on our motor but what we can now do is we can use tracing to detect when these signals turn on and show us unlike a trend to understand how these signals are working so let's go and have a look at traces now traces are on the left hand side here and it's just a tool and it's just called traces if we double click our traces this is what we should get now i'm just going to minimize some of these windows so we can get a bit more of a better view and this is our tracing and like i said it's very similar to a trend so here we've got our graph we've got our show trace data and it's currently set to none because nothing's been set up there's nothing there and we've got our start and our stop record button and we've got some other tools here where we can manipulate the actual trend itself now before we actually get started we need to go to our properties and here is the property for the first trace that we're going to be using if i just minimize our properties again and i just drag this bar up here and just click on it there we go there we go you can see here we've got no traces actually configured what i can do is i can add in a trace i'll just call this trace one there we go you'll see what's got a little red border around it it's because nothing's been set up if i click on if i click on trace one like so and now i go to its properties i can start adding in the signals for trace one so what i want to do is i want to add in a couple of signals i want to add in our m1.0 which is our signal one i want to add in our m2.0 and then what i want to do is i want to add in our output q zero dot zero we can then choose the color of these trends we've got here red we've got cayenne and magenta what i want to do is because we've got a light background we can change that i want to choose dark colors though so instead of cayenne we'll use just a dark blue and instead of magenta we'll use a pure green so we've got some dark colors now that will reflect better on the white background for our trend recording conditions if i go to sampling you can see here it's going to sample with our main block and that's our ob1 and it's going to record every one cycle of our main block what this is going to do it's going to record on every one plc scan now this means that depending upon how fast your plc is scanning it's going to take a sample on every scan at every x amount of time and it will tell you here recording duration is going to be 47 659 samples so if we look at our recording duration it's going to record 1 47 659 samples and we've got it set here to use max recording duration so that's as many samples as we can take so again let's just imagine our plc scan time is one millisecond well this is going to take 47 000 milliseconds before the actual buffer is full and then stop so that'll give us about 47 seconds of readings this means that we can't use trends for long periods of time we can't use our traces for long periods of time like we would do on hmi or scada with an hmi or scada we can run these trends for days weeks if we wanted to and all this data will be tracked because it's storing the information inside of the pc inside of the laptop and with laptops and pcs they've greater memory than the plc does whilst this tracing here is being stored inside of the plc so a limited to how many we can actually how many samples we can actually take inside of our process so we wouldn't use this for long periods of times just short periods of times let's imagine we've got an intermittent fault when we are starting up our process this is where we could use traces because we can then select the signals that we believe are causing the problem at the start of the process we can then start the process wait until the problem occurs and we can capture all of that on our trace but what we wouldn't do is we wouldn't use this for an intermittent fault which could last a period of hours a period of days a period of weeks before it occurs again because we simply just wouldn't have the memory to be able to do so so we've got to be very careful about how we're working with this now some people might say well one scan sample rate is too quick i don't need a one scan sample rate that often because that's going to take a sample every one milliseconds so what you could do is you could say okay then we'll take a sample every 10 cycles of the plc so every 10 milliseconds the greater the cycles the smaller the sample rate is going to be but the less accurate things are going to be if you've got a fast signal which is turning on for 100 milliseconds like in our process and then turning back off again if we set our sample rate to every 1000 cycles which would be equivalent to every one second our signal might turn on and then back off again during the two samples and we'll never see that signal happen so we've got to try and find the nice balance now i'm going to leave this to every one cycle we don't want to run this trend for too long so we're going to leave it for every one cycle the trigger it says there trigger mode record immediately so when we tell it to record it's going to start recording but we can have this trigger on a tag so if you had like the start push button or your stop push button or anything like that you can say right to trigger when we press the start push button and then it will start recording that trend we're just going to have it on record immediately so that's now our trace setup and you can create multiples of these to create a second trace a third trace a fourth trace and give these names and then assign different signals to those names there so what i'm going to do is i'm just going to go back to ob1 i'm going to download this program first of all and start the plc so this program is now inside of there if i go back to my traces that i've got over here so now that we're back with our traces what we're going to do is we're going to go online and it'll connect to our plc and just minimize this window here we can now transfer our trace to our plc so here you can see we've got to configure trace making sure that's selected i can then use this button here to transfer this to the plc now it's going to bring up a warning message it's going to say do you want to enable tracing and the warning will say here using tracing while the process is running may endanger the life or health of personnel or cause damage to the machine or the entire plant so it's quite a serious warning here what this is talking about is because we're going to be installing this trace inside of the plc and then running it the plc is then going to have to send all of this data to our trace this can slow down the plc scan we might miss certain signals certain signals might not turn on and like i say it then could endanger personnel or damage equipment because we're losing signaling inside of the plc we should only be doing this for testing purposes again if you're unsure don't use this in actual practical purposes we're just using it here on a test bench so it also mentions that note that enabling tracing may increase the cycle time of the plc as it's adding to the overhead of the plc so i'm just going to say yes to that because like i say we're on just a test bench here and we can see here that the status is currently inactive now i'm just going to open up a watch table i'm going to go to add new watch table and i'm going to type in the signals that i want the trigger so m1.0n2.0 m3.0 these are my signal one signal two and signal three i'm just gonna pop that out and resize it so i can see both windows here there we go okay i'm gonna type in for the modify signal on signal to a value of one and i'm gonna go to our tray state here i'm gonna drop this down and select trace one and now it's going to be ready now we're going to get ready to start this trace so what we're going to do is we're going to click on record and then i'm going to activate signal 2. what we'll see is we'll see signal 2 turn on our output will then turn on as well when i turn off signal 2 our output will remain on until we reset the actual latch so let's record this trace let's go into our program here and let's modify the signal so our latch should now turn on and if i then send that back to zero fire that into the plc it'll then turn off and then if i set this to a logic one fire that into the plc that should then reset my latch and there we go and now what we're going to be seeing is this trace running in the background and you can see here it's starting to take our samples and start to create our trend here and there we go 16 seconds 17 seconds 18 seconds and that's how much that trend actually had taken so this tells me that my plc scan time is a little bit quicker than one millisecond because it should have taken 47 000 i think it was samples in that period and it did that over 18 seconds so we don't get much data here but if we've got a fast signal like i said on the start of a process or at a certain part of the process this is where we can use this and we can see in our trend over here that our signal one had remained at a logic zero the entire time but our signal two had turned on at the same time as our output did and then we can see our signal 2 turned off and our output remained on and then later on we then reset the output but we don't see that as it didn't track that okay so that's a pretty useful at that side there so what happens if our quickest signal turns on because this was on for a quite a long period of time so what about our quicker signal of a hundred milliseconds well if i just delete that modify value delete that modify value and set this guide to one and now if i then activate recording again and i then just fire this signal into our plc there we go you can see it turned on and then turned back off extremely quickly and what i'll then do is i'll then reset our latch whoops it triggered the second signal again not too worried about that there we go let the trend tick away you'll see it do a quick refresh of everything and there we go brilliant there we go so we can actually see here that this signal one turned on a few times that's because i left that true signal inside of my watch table but there we go we actually see exactly what triggered our output there even though that signal was only on for 100 milliseconds because the sample rate was quicker than that 100 millisecond signal we can see here that our signal wanted turned on briefly very briefly 100 milliseconds in time and that is what turned on our output we then triggered our reset and that reset our output at the same time it then triggered our signal one again not too worried about that and then when i turned off the reset it then triggered our signal one again which then latched on my output so if i just go to our watch table here and then just zero that and just reset our latch there we go just send that back to a false and then just delete that so there we go we got to detect really quick simply what about quicker signaling though what if we go back to our main ob1 and we change this timer from 100 milliseconds to 10 milliseconds let's fire that into the plc let's see if it would detect that it should do because again our sample rate is everyone's scan of the plc so the plc is going to be scanning this program executing that timer so it should be able to detect this there we go it's inside of the plc now let's go back to our trace and let's go back to our watch table let's set that to a logic one so we can get ready to set it and let's activate recording again so here let's just trigger our signal one we never saw that signal actually change state but it did if i then just delete that reset the latch there we go and set this back to zero there we go and then just delete that back to the beginning again now when we get ready to detect our trace you can see there there's the signal it's a lot quicker now you can't really see it turning on for a long period of time here but again even though that signal was only on for 10 milliseconds we would have never been able to see that from the plc program you would have never been able to see that turn on but we can capture it via this trace over here so it's a really great way of actually detecting these now like i say you can actually manipulate this trend a little bit better so we can visualize signals quicker if we want to we can use this selection window zoom selection and we can highlight the window that we want the monitor and there we go it now zooms in on that and we can see a little bit better of a signal and we can zoom in further and further again actually capture that signal and there's that input one turning on for 10 milliseconds and we can now see it over a larger scale so if we have signals turning on for extremely brief periods of time we can detect that with this trace if we just went back to main ob1 here and i just went to view the program and i just toggle the signal from here we never see it turn on it just remains blue all the time that's because the laptop isn't updating our program that quickly so from here we don't know which signal turned on but with our trace we can actually track that and that's what's great about tracing like i say if we need to just track something over a short period of time and see which signals are turning on and turning off we can use traces for that if we need the track signals over a long periods of times we needed to trace this for a lot longer than just 18 seconds we need to trace it for a few days there's other instructions that we can use and that's what we teach on our imfp training the industrial maintenance and fault finding pro how we can locate intimate and faults over longer periods of time if you've got an idea about how we could do that write it down in the comments below and let us know about how you would do that to track a signal over a longer period of time to detect whether it is turning on or if it's another signal that's turning on i hope you've enjoyed this little video about traces inside of our plc what we might do is we might have a look at traces inside of another plc like our rs objects 5000 because that's also got the capability of that as well as our on-run cx programmer too so we can see how they work in those plcs until next time don't forget to hit the like button leave a comment below let me know how you would do this over a longer period of time and don't forget to subscribe i'll see you again next time have a good one you
Info
Channel: Scantime Automation & Training
Views: 547
Rating: undefined out of 5
Keywords: scantime, siemens, allen bradley, omron, mitsubishi, schneider, keyence, telemechanique, ge fanuc, plc, hmi, scada, programmable logic controllers, human machine interface, supervisory control and data acquistion, programming, ladder logic, structured text, instruction list, function, function block, data block, vat table, watch table, training, tia portal, step7 professional, rslogix 5000, studio 5000, rslogix 500, gxworks 3, gxworks 2, gx developer, syswin, cxprogrammer, sysmac studio
Id: NXy7tAWOu8c
Channel Id: undefined
Length: 20min 56sec (1256 seconds)
Published: Fri Dec 03 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.