RSLogix 5000 - Trending PLC Tags

Vladimir Romanov
A free video tutorial from Vladimir Romanov
Electrical Engineer
4.4 instructor rating • 4 courses • 11,926 students

Learn more from the full course

PLC Programming - Training from Scratch on RSLogix500 & 5000

PLC programming from scratch training class by a controls engineer equipped with PLC systems - Allen Bradley RSLogix 500

14:16:57 of on-demand video • Updated November 2019

  • Understand how a Programmable Logic Controller (PLC) works
  • Understand how to programm a PLC
  • Showcase several completed projects to an employer
  • Pass a technical PLC interview
English [Auto] What is going on, guys, Vlad with Solus, Felecia Dotcom, and welcome to this advanced programming topic and Studio 5000 in which we are going to be talking about trends. Now trends are extremely, extremely important for troubleshooting and just for checking out the way your logic works in general. It is something that I use not extremely frequently, not on a daily basis, but whenever I have problems, whenever somebody on the floor tells me that I have some kind of a sequence issue, I often resort to trends. Now, trends can allow you to essentially show a display of what is the value of any of your tags, including booleans, integers, integers, real and so on, on a real time basis. Now, Trends is something that runs on your p.l.c.. So it is processing that data in real time. So it allows you to monitor very closely and essentially it allows you to always step back and see what that value was while the trend was running just a moment ago. So think of trends to be something like an oscilloscope from for an analog signal. It is something that logs data and we will take a look at them shortly. Now, let's take a look at the setup that we have here. So what I've set up is a very simple ladder logic program, which essentially runs three different times. So you see this system timer zero, then you have a wrong with system system timer one and a system timer to all at the bottom here as well on the last rung. So these three timers are essentially running in a loop. So the timer finishes, then it goes back to zero, then it goes all the way back to the preset value. I'm not going to go into too much detail about that. And then I have a limited instruction which by based on two elements. So the lower and the upper limit will turn on a bit. So in this case, it's a system pull zero, then you have a system plus one and a system pulse two. Now this is a very common practice. So think of a scenario where you have something on a cammed drive, which means that on a sequential basis you are detecting a is a level of proccess, for example, or this could be think of something simple, like you have a conveyor where boxes are traveling. So every single time you expect to detect a box. So the signal will go high when the box is in front of Prox and the signal will be low whenever there's nothing in front of the box. And the scenario is somebody tells you, hey, for some reason to the box counter is not running or the camera's not running or we're not detecting a certain prox. Now, you come into this program and you're looking at these pulses and of course, through these limits, you can figure out what's going on. But in reality, you wouldn't have these levels. This is just for simulation purposes. But you have this very important feature here on the left side called Trends. And if you right click this, you can create a new trend. This is something you can do online and we'll talk about this in detail. So this is going to be our pulse trend and try to name this as something that's specific to what you're doing. So sometimes you work with motors to name that motor trend sample period. So this is very important as well. So in the past, typically, and depending on your application, you may want to increase this, but if you don't have a lot of stuff running on your processor, you can go all the way down to a single millisecond. And this is essentially telling the BBC, how often do you want to check for those values? So, of course, the lower the number, the more frequently you will be checking and making sure that the data is retrieved. However, the drawback is that the the more you sample, the more you take away from the processors ability to execute your program. So what can happen is and that's why I don't recommend always doing this online with a live running processor, is that if you make this too, too fast, so the lower the number, the faster you sample. But if you make this too fast, then you can affect your process. So essentially your program is going to execute a lot slower. But in any case here, I don't have anything critical. So I can just make that to be, I guess, the fastest sampling possible. Now, here we are in the in the pen or the setup section. And here's where you essentially pull out the tags that you want to display on your trend. And like I've mentioned, I want to look at these system pulse zero one and two. So I'm going to find the tags. So here you'll see the controller tags. And depending on if you want to go into program tags, then you can do so here. But in any case, we're going to select those three pulses so system on their pulse. And I want to hit this zero. I'm going to hit ADD. Then I'm going to hit this one, I'm going to hit ad and I'm going to hit two, so I have three pulses, I'm going to add all three of them like so and I'm going to click finish. Now you'll see this window pop up, which is essentially your trend window. And you have a couple of buttons which are very important. So here you can start your trend. So if we start right now, you will see those pulses appear on the screen. It should auto scale to the trends. Let's see what's not running. There we go. So it's running and you see a screen of just flickering numbers. Now, this is, I guess, out of the box set up. It's not very, very useful and it doesn't tell us a whole lot of what's going on. So what we need to do is go into this chart properties and here is where you configure your trends. Now, I won't go into full detail, but essentially what's very important is your x axis. So this is the amount of time you want to see within your window. And typically you want to increase this depending on how fast your application is or how fast you're trying to catch an error of you can increase this in our situation up to, let's say, 30. What I also like to do is go into my y axis and here's where you can split the patterns. So what I refer to Pans is essentially each separate trend. So in this case, I have three of them. So the each individual tag is essentially a pen or a a trend. So if I do this isolated graphing, this allows me to essentially separate them. So as you can see here, all of them are on the same screen, but this will separate them. If I had apply, you will see that in a way the selected apply, then you will see them separated. So on the top here I have my pulse zero plus one and pulse too. But also I like to do whatever I have booleans. So I go into my pants and here you will specify this. So you see this this min and max value add for my booleans, meaning zero to one Tagg's. I always put it in minus one and two. And the reason being is that it scales a little bit better. So as you as you will notice here, this essentially this is one of this green tag touches this zero of this attack. And it just drives me a little bit crazy, I guess. So I will select the setting, as you can see, minimum and maximum value based on the men and max settings from the stub. This is exactly what that was. So Pants Men and Max, you can either do it automatic so the trends or the PRC will try and fit it to an automatic stay. But I rarely use automatic. So either preset based on the patterns or I use custom where you can specify for all of them. But I want to include a few other things, so I'm not going to do it that way. And as you can see now, you can see those. Those tags very clearly, so you see those waves and they don't they never overlap, essentially. Now, if we hit run, we should be able to see those tags go up and down through zeros and ones. And I can already tell that on your screen, it is not scaling as nice as it should as I would like it to, but essentially if I stop my trend. You will notice so first of all, I guess when you look at the environment directly on my recording software, it's not making this justice, but you do get these bars. So, for example, here, the green bar is missing, but I apologize for that. But it is there. And then you can see the blue pulse all the way up here. It is being it is coming in as clockwork. So you will notice that the. Trending software is a very, very precise and gives you values are every every single moment. Now, the other thing that's very useful is, as you can see, this white bar, this tells me so first of all, it tells me the time all the way up here, if you can see it on the screen. So it's seven, 11, 52 rpm. But it also tells me what the values are of all those tags at that specific moment. So, for example, if I if I put it here, for example, we can see that it intersects. So this is where the blue tag is one. The green one is also one. So it's a little bit difficult to see, as I can tell in my recording software. But and this red tag is also one. So it will tell me exactly what the values are at that specific moment. And of course, if I play with the values that I had on the properties here, then I can essentially stretch or contract my graph. So this is extremely important. So in this X-axis, remember that I set this to 30 seconds, but if I set this to ten, then I might be able to expand further. And by expanding, I have a lot more data points that I can shift this wide bar onto. And that's just extremely useful and you can there's a lot of things that you can do. You can zoom in, you can zoom out. If you essentially if you if you create a couple of settings, you can also create a snapshot. So a snapshot allows you to save this data. So let's let's see here if this is it allows you to save this data as this DBF file and then you can process that in Excel. So that's also very important. But let's go back to the trend itself. So why you know, why do you need trends? And the reason why you need trends is that you can see certain timing issues, which you may not see otherwise. So as an example, you see that this green green tag is coming on a right as the blue tag is already one. So maybe in your machine code you've noticed that there's a certain overlap that you need in order to get that started. Now, based on this evaluation, you can go back into your trend testing routine. And this could tell you this may not necessarily always be a an electrical problem, but this could be something like a bold got loose and you have a situation where the cam prox is triggering at an appropriate time. So that would be one example where a trends would allow you to solve or to figure out a mechanical deficiency has occurred. Furthermore, like I like I've explained the example of boxes. Maybe the boxes are no longer detecting, therefore the counter is no longer working. And you will notice that in your trends as well. You will trend that prox and maybe the light on the products is working, but the input is not working. So that will tell you that there is a problem immediately. And what else so you will see so as you can see here, this is triggering on a timer of one thousand and if you, for example, move these value, you will immediately see a change on your trends. So let's run this once again. And you will you see this particular pattern once again. It's not giving it justice on my recording software, but it is coming in like clockwork. So look at the so pay attention to the width of these blue signals and as we go back into our software. Let's change this to be, for example, 800, so now our pulse should have changed and as you can see, it is much, much wider now. So we've effectively changed that tag and the tag is being trended in real time. So you can see all kinds of very useful information within these tags. Now, let's do something a little bit more interesting so we see only the bits which are triggered through those values. All right. So let's do something a little bit more interesting with our Trents. So right now, we're only getting the boolean values from those tags which are in in the trend testing routine. So we have these pulses, three pulses, which are being triggered. However, trends are much, much more powerful than that. Let's go back into that window. We can stop the trend in order to add different points. So if we're going to chart properties patterns and then I hit this ad configure tags, then I can add more tags from white p.l.c.. If I go in to select a tag and then I scroll down to System Taimur, I can essentially expand my Taimur structure. And this is something we've talked about before. But you can set this so you have this accumulated value and this is in this case, a dent. You can add that in there as well. And then we have three times. So let's do all three of those. So it's very versatile. It allows you to do a whole lot of stuff. Or one we're going to hit and then we're going to add the last time, which is going to be timer to accumulate it hit and hit. OK, what's going to be different? All that we need to take care of is that, remember, we're using the scheme on the Y axis where we're using the settings from the pen stub and the timer is to have a different scale than our booleans. So the timers, of course, are not set to be from zero to 100. But as you remember, we have one timer that goes from zero to a thousand, a different one which goes from zero to three thousand, and the last one is zero to five thousand. So to make things a little bit easier to see, we can set them all to be on the same scale. And again, this is something that you will acquire as you practice trending and you will, I guess, develop maybe your own scheme of how to set up things. And there's no, I guess, set way of doing things. But it all depends on how you want to see this data and what you're going to do with this data. And so now here, as you can see, very cool stuff. But you see the three different timers which are running on the bottom here. And we're essentially looking at all those values. And again, my recording software is scaling down. I'm just looking at the screen of the recording and it's scaling down those timers. And the trend is not as smooth as I'm seeing it in front of me. But if we stop this trend, we can certainly get the real values. And as you can see or may not be able to see that, well, the tags in this white bar will be representing of what the timers are at. So really quickly discussing that we have in purple this, I guess, middle section here. That's our one second timer. The white one is going to be our three second timer, and then the blue one is going to be the five second timer. And of course, at certain points, they do overlap. I'm sorry. When you drag and you don't have a when you have an insulated graphic mode, then it doesn't allow you to scale. That's where you're seeing the error. But. At any point in time, you can go and see what the value of the timer was and you can troubleshoot your system really easily, you can see when your signals are toggling. So even looking at this, I can immediately tell you around which time I'm getting this blue pulse to go down, for example, or at which time I get the blue pulse to go up. So extremely, extremely important. And you can trend anything that you can think of, you can find very useful as I worked at Procter and Gamble for trending motor talks. So when you have a mechanical system running, a mechanical engineer would typically rely on somebody who's used the controls to tell them when a servo or just any motor is over talking. And by trending the torque feedback of a motor, for example, Kinetics 60 to 100 series, you should be able to see when it spikes up and essentially over talks and faults out the motor. So extremely, extremely powerful tool in terms of trending. And do let me know if you have any questions or concerns or I guess I need to clarify how to use the system. But there's a lot of different parameters that you can play with. And I guess I do recommend that you investigate all of them and read the documentation.