CLICK PID has tons of awesome features that we had to skip over to keep the tutorials at a reasonable length. So in this video we'll back up and dig a little deeper into many of those topics. This video is really 16 mini videos all crammed into to one with an index at the beginning so you can quickly find any topic of interest to you. These will help you get the most out of using the CLICK PID feature, so take a few minutes to skim through this video.
Resources used in this series can be found here: https://library.automationdirect.com/click-plc-temperature-pid-tuning-resource-page/
Videos in this series:
Configure part A: https://youtu.be/Ak2eFFHkriM
Configure part B: https://youtu.be/f8X7prho8dU
AutoTune part A: https://youtu.be/8T1A0ryIGfo
AutoTune part B: https://youtu.be/bEpbia94W
Manual Tune part A
Manual Tune part B
Bonus: Sizing Fans:
Bonus: Freeze Bias:
Bonus: C-more PID Template part A
Bonus: C-more PID Template part B
This is a list of the topics covered by this video so you can quickly scroll through the video and find the topics you are interested in. Once you have your tuning coefficients the way you want them in the PLC, don’t forget to hit this button to copy them back into the project so you can save them with the project. For example, if I hit Read from Project, I see the saved project values are not what’s currently in the PLC. If I hit Save current PLC values to Project THEN read the project values, we see they are now the same. Notice the scope of these buttons. These are down here and don’t change from tab to tab. That means one button press updates all of these tabs. This button is in here so it only applies to the parameters on this tab. Each tab has its own button, if appropriate. You may have noticed as we went through our demos that the PID Monitor Icon changes. If it looks like this, then everything is great. If it has a red X through it, then it means you are not connected to a PLC so you can’t monitor anything. Finally, if you see a red exclamation point like this, it means there is an error in that PID loop. Speaking of errors, the CLICK PID dialogs are really good about error checking. For example, if I try to enter something below 100ms for the sample time, I get an error. But you can also write to this from ladder or even a data view where you may not have error checking. The good news is, the CLICK PID watches your back and tells you if you did something wrong. Open this error dialog and you see that this PID loop has this error. Fix it, and the error goes away. Did you notice that every PID dialog has these little address helpers to remind you where you can find every memory location associated with PID? But remember, these are MY memory addresses. If you allocated a different block of memory, your addresses will be different. Beware that these are not status bits – they don’t tell you what the current mode is or if autotune is running. They are request bits. For example, if you want to switch to auto mode in your ladder code, you would set this bit. Once the transition has been made, PID will clear the bit so you know it is done. There are separate bits to indicate the actual status of these guys. Same thing for this one too. One of the cool things about CLICK PID is that all of the memory locations associated with PID are automatically given nicknames. I love that I don’t have to type those in myself. Each nickname has the PID loop name, the type and the name. It also provides a comment for each memory location giving some more detail about what each one is. And the quickest way to see all of those nicknames is with the list view. You can view by category or memory location for each PID loop. And again, you can see that every location has an automatically generated nickname and comment. Of course, you can change those anytime you want. This is also why you were limited to 6 characters when you created the PID loop name in the PID setup dialog. That prevents these automatic nicknames from getting too long. The CLICK PID monitor can display an enormous amount of historical data, so there are several levels of scaling to help manage that. First, there is the plot interval duration. This is a plot interval and it is currently 1 second wide. We’re looking at a plot interval that is this many seconds after I started the PID monitor. I can scroll back to the beginning or one interval at a time using these arrow keys. We can increase the duration of each of these intervals up to 60 minutes, so now we are looking at an hour of recorded data You can also show up to 10 of these intervals at the same time, so now we are looking at 10 hours of data. Finally, you can zoom that out another ten steps, so now we are looking at roughly two months of time here. And if I had over two months of data, I could even scroll through that. Very cool. You can also format and control the color of everything you see here. There’s lots of flexibility here so you can display things exactly the way you need them. Noise can really mess with auto tuning. This filter option allows you add filtering to the process variable before it gets to the PID algorithm. Just remember that a 100 here says to let 100% of the signal fidelity through. So, the smaller the number, the more high frequency content will be filtered out. I typically find that a filtering number of around 20 works well for my projects, so start there and experiment. Just be sure to keep the number as large as possible. Aggressive filtering will slow down the PID response. Also, note that when you set up PID, you can leave filtering disabled. If you change your mind, simply set this bit via ladder or data view and filtering will be enabled. Filtering filters the process variable before it gets to the PID stuff. Error dead band provides another kind of noise reduction, but it does it on the error signal. I envision the error dead band as a string. One end is tied to the error signal coming into the error dead band and the other end is tied to the signal coming out. If the incoming error moves enough to pull the string taught, then the resulting signal moves. As long as the string has slack, the resulting error stays the same. Again, you want to keep this as small as possible or it will slow down the PID response. This guy squares the error. So, errors smaller than 1 will get reduced and large errors will get amplified. That will make your system less responsive to small errors which helps reject low noise levels. Notice that this gets applied BEFORE the error dead band. You can limit the magnitude of the control output. Maybe you don’t want your system to be able to go to the max possible value for safety reasons or to protect your machine. You can set that limit on both the high and the low end. That works regardless so it will also prevent autotune from driving the system too hard. Just understand that this isn’t re-scaling the output – it’s cutting off portions of the output range. The Freeze Bias option helps you optimize your PID tuning by preventing the integral term of the PID equation from getting out of control when there are large differences between the setpoint and the process variable. It’s worth spending time to understand this because it gives you better insight into how PID works. So, rather than make this video any longer than it already is, I pushed this topic off to its own little bonus video. When you switch from manual mode to auto mode, what happens to the process? Let’s switch to manual mode, move the setpoint away from the process variable and then switch to auto mode. As expected, PID goes to max output to try to get the process variable to the setpoint as fast as possible. In our temperature demo that’s no big deal because things move so slowly. But, if you have a fast-moving massive machine going straight to full output when switching to auto mode, it could be dangerous or could damage the machine. That’s what bumpless mode is for. It forces the setpoint to whatever the process variable is so there is no sudden bump in output which allows you to switch to auto mode without having to worry about the machine going crazy. For example, I’ll switch back to manual mode, and make sure there is a good separation between the process variable and the setpoint. I’ll bring up a data view and switch to bumpless mode. Now when we enter auto mode, the setpoint was automatically forced to be the same level as the process variable so PID wouldn’t see any need to make a large change in the output. Now we gradually raise the setpoint in a controlled manner to keep the system from creating a hazardous situation. I know you are watching these videos because you don’t want to read the help file. But I want to encourage you to take a quick spin through the PID section. It’s really well done and will give you even more insight into how the CLICK PID stuff works. Especially this one that gives you a good top-level overview of how it all fits together. Click here to see all the videos in this series. Click here to learn about AutomationDirect’s FREE support options and click here to subscribe to our YouTube channel so you will be notified when we publish new videos.