In this video, we’ll do a really quick walkthrough of how to use PID in a CLICK PLC
so you can see where to find everything and get a feel for the workflow.
I’m using the same hardware setup as shown in the tutorial videos in this series, so
we’re not going to cover that here.
And I’ve already connected to the CLICK PLC, started a new project and set up the I/O
for that hardware.
To set up a PID loop, right click on PID Setup and add a loop.
Now you just set up each section by clicking on the part of the loop you want to work on
... or the individual tab.
The key here is you want to get rid of all of the RED check marks.
In the general tab, you give the loop a name and allocate the memory blocks you want to
set aside for PID.
Here we can put limits on the setpoint.
On this tab, we can modify the error signal.
In the loop algorithm section, we need to enter some starting values for the PID coefficients.
The helpfile recommends these to prepare for autotune.
We also have all the usual PID options.
We do want to make sure Bumpless mode 2 is on to prepare for autotune.
And we do have a direct acting system.
Green check mark, next tab.
You can scale the output to fit your process needs but since this hardware uses a PWM output
I’ll enable that, tell it to control Y1 and a 1 second period works fine for this
demo.
In the process variable tab, we tell the PID algorithm what the expected max and min Process
Variable will be.
It’s important to understand that this is NOT your sensor's range.
It’s the process variable value you expect to see when the control output is zero and
when it's 100%.
That provides the scaling PID needs to make everything work so it’s really important
you don’t miss that one.
You can filter the process variable here too.
Finally, you can set up any alarms if you want to.
We’ve gotten rid of all the RED checkmarks, so I’ll write all these PID Register values
to the PLC and hit OK.
CLICK PID requires no ladder logic, but we still need an END statement … and we need
to transfer the PID configuration to the PLC.
That transfer set everything up for PID, but it did not write the PID register values because
you may not want to overwrite an existing PID configuration setting when transferring a
project – right?
Which explains why we were able to write the registers from the PID setup dialog BEFORE we
transferred the project.
They are completely independent.
We now have a configured PID loop installed on the CLICK PLC, and we also now have a PID
monitor for that loop.
If we open up that PID monitor, we can see all the values we wrote before the transfer
are sitting there waiting for us!
I’ll flip the PLC’s switch to RUN mode and I’m going to adjust the display axes
to the range I know we’ll need and turn off these dots to clean up the display.
To do an autotune, start in manual mode, and put the setpoint where you intend to operate.
Manually adjust the output to get your process within a few percent of the setpoint.
It will take a while to get the oven up to temperature, so I’ll fast forward the video
and tweak the display axes as we go.
Now that our process is close to our setpoint and stable, flip over to Auto mode, select
the algorithm type and enter the hysteresis you need.
Hit Start.
I’ll fast forward through that … and if I zoom in a little we see the typical three
bump autotune cycle, the message that it completed successfully, and the new PID coefficients
and sample time.
PID is now running!
Let’s bump the setpoint up 5 degrees and fast forward the video and we see PID automatically
adjusted the control output to get our process to the new setpoint quickly and efficiently
with just a little overshoot.
Exactly what I want to see.
If I drop the setpoint to 100 degrees and fast forward the video, PID automatically
adjusts the output to get the process variable to that level.
And let’s get things back to the starting point.
That’s it!
Just walk through the step-by-step setup dialog and do an autotune.
You can have up to 8 PID loops running at the same time.
Check out the rest of the videos in this series where we slow down and walk step-by-step through
how all of this works, so you can get the most out of using PID in the CLICK PLC.
We also give you some guidance on things to look out for and run lots of examples to help
get you comfortable with using PID.
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!