https://www.AutomationDirect.com/click-plcs
(VID-CL-0048)
Configuring PID in the CLICK PLC is easy with PID Setup Dialog. But there are some things to watch out for and lots of options, so join us in this video where we will walk you step by step through the process of setting up a PID configuration.
Resources used in this series can be found here: https://library.automationdirect.com/click-plc-temperature-pid-tuning-resource-page/
Videos in this series:
Overview: https://www.automationdirect.com/VID-CL-0044
QuickStart: https://www.automationdirect.com/VID-CL-0045
Hardware: https://www.automationdirect.com/VID-CL-0046
Configure part A: https://www.automationdirect.com/VID-CL-0047
Configure part B: https://www.automationdirect.com/VID-CL-0048
AutoTune part A: https://www.automationdirect.com/VID-CL-0049
AutoTune part B: https://www.automationdirect.com/VID-CL-0050
Manual Tune part A: https://www.automationdirect.com/VID-CL-0051
Manual Tune part B : https://www.automationdirect.com/VID-CL-0052
Ramp Soak: https://www.automationdirect.com/VID-CL-0053
Loose Ends: https://www.automationdirect.com/VID-CL-0054
Bonus: Sizing Fans: https://www.automationdirect.com/VID-CL-0055
Bonus: Freeze Bias: https://www.automationdirect.com/VID-CL-0058
Bonus: C-more PID Template part A: https://www.automationdirect.com/VID-CL-0056
Bonus: C-more PID Template part B: https://www.automationdirect.com/VID-CL-0057
In the previous video, we set up our PID Loop. Now we are going to set up the PLC’s Analog I/O for PID and transfer the PID configuration to the PLC. This PLC has Analog I/O built into the CPU, so we go to setup, CPU Built in I/O. Click on the INPUTs tab. Our sensors generate 4-20 milli-amps so we want these. Our sensor’s range over the 4 to 20 mA’s is 0 to 300 degrees so we put that here. Now everything we do will be in degrees Fahrenheit. We need for the raw process variable to end up where? Well, if we go look at the DF memory and scroll down to the 100 block we allocated, we see the raw process variable needs to end up in DF11, or 12 memory locations from the start of whatever memory block you specified. So we put that here. The room temperature sensor is identical, so I’ll do the same thing here. Watch out for this – the click software automatically put the next DF register for our room temperature sensor here. But if unselect this continuous address thing and go look at the DF memory again, we see that the DF112 address is reserved for the filtered process variable and we really don’t want to overwrite it with the analog input – right? So let’s change the analog input to write to DF1 which I have already named Room Temperature. So if you are using PID, it’s a good idea to just turn this off so if someone comes back later and adds another analog input they won’t accidentally overwrite your PID configuration. Range limiting is on by default. That will issue an error message if things go beyond what we expect. That’s a good thing, so we’ll leave it enabled. Hit OK. Where are we? We have configured PID and we configured our analog inputs! And look! Were done and we have NO ladder code! We just add an end instruction, then connect to the PLC, and transfer the project to the PLC. I’m going to assume you know how to do that. Great, now that we are connected to a PLC with a configured PID loop, we can double click on the new PID monitor that was automatically created for this loop! I love this dialog because I can see at a glance everything I need to know about my PID Loop. And right now, it’s telling us something REALLY important. If you look at all of these values, the right hand column is what is in the project, the left-hand column is what’s in the PLC. Do you see it yet? Yeah, even though we transferred the project to the PLC, NONE of the PID configuration values have been written to the PLC yet. Why is that? Well, because you or someone else may have tuned the PID loop after the last transfer without saving it to the project and you probably don’t want to overwrite that. By not automatically writing the PID configuration values on project transfer, you are forced to manually write those values yourself which gives you one last opportunity to stop and think - have I made any changes to my PID configuration? And if so, do I want to save it before overwriting it? There are some buttons here for reading and saving the values shown on the screen here, but they only write the parameters you see here. They don’t read and write ALL of the other PID configuration parameters. You could force the values individually via a dataview or program them into your ladder code of course, but we haven’t done any of that yet, so the only way to read and write the PID configuration is to go back to the PID setup. If you look at the previous video, you will see that there were some buttons to do that, but they were dimmed out because we weren’t connected to the PLC. Now that we ARE connected to the PLC, we can exit the PID monitor and go back to the setup dialog where we see the read and write buttons are now enabled. So the best way to make changes to your PID configuration is to read all of the configuration data from the PLC, make your changes, and then write all the registers to the PLC. That will preserve any changes made since the last transfer. And since these buttons are outside this box, they affect everything inside the box, which includes all of these tabs. We don’t want the PLC values to overwrite our new configuration we set up, so we are going to skip reading the values and overwrite all the PID setup configuration registers to the PLC. Now these values are in both the project and the PLC. Now if we go back to the PID monitor, we see that the project and the PLC values have been updated, which is a good reminder that we updated all the others too. Suppose we got some new tuning parameters here – I’ll just enter some random numbers for now – and we want to enable filtering. We can’t because it’s currently disabled. So, we need to close the monitor, go to PID setup and before making any changes, read the current values. You can see here it pulled in the new tuning coefficients that I just entered. Now we can enable process variable filtering and then write all values back to the PLC. Reading the PC values first preserved the new tuning coefficients AND put them in the the project so we can save them for future transfers. If we go back to our PID monitor, sure enough the process variable filtering is enabled and we see that we did, in fact, preserve the tuning coefficients. I hate spending so much time on reading and writing values but it’s really important that you understand that the PID configuration values are not written to the PLC with a project transfer. You have to do it via the setup dialog or via ladder or via dataview. Ok, enough of that. Let’s get back on track. The first thing to notice is we are in manual mode. It’s important to understand that the PID math is running all the time. And normally it automatically controls the PID output. But, we can disconnect that and manually control the PID output so we can force the PID output to whatever value we want. You’ll see how handy that is in the next video when we characterize our system. These guys switch us between those two modes. Our PID system is now set up and ready to use so join me in the next video where we will characterize our system by manually manipulating the output, do an autotune and then run a bunch of examples so we can see how well PID works in the CLICK PLC! 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.
Voted #1 mid-sized employer in Atlanta
Check out our
job openings