The setpoint for the PID process is in parameter 911.
We have been manually entering that from the keypad in all of the videos in this series.
The cool thing about the WEG CFW series of drives is that the setpoint can come from lots
of different places.
Parameter 920 controls where the setpoint comes from.
It can come from the HMI like we have been doing.
It can come from an external device via one of the communications modules.
Maybe you have a PLC talking to the drive via Modbus RTU.
The PLC just writes to parameter 911’s address to set the new setpoint.
Check out the WEG VFD Modbus RTU videos if you want to learn how to communicate with
a WEG VFD via Modbus RTU.
The setpoint can come from an analog input.
Maybe you have a drive running a process and you want a second drive to follow that process.
Or maybe you just want to connect a potentiometer so you can dial up whatever setpoint you want.
Let’s do an analog setpoint example using a potentiometer.
The CFW300 variable frequency drive has one analog input on the base drive, but we are using
that for the process variable, so I added an analog option module to give us a second
analog input for our setpoint potentiometer.
You can use any analog input module you want. I chose this one because it was the least
expensive.
I wired it like this. I love that the CFW300 provides the 10-volt reference I need for
the pot!
Ok, let’s fire this thing up and go view parameter 27 which tells us if we installed
the module correctly.
Yep – I see a 1 which is this IO module.
I got that from the drives programming manual parameter listings.
If you see a 0 here then something is wrong. Go take a look and make sure those pins
didn’t get bent.
You can also see the software version of that module in parameter 24.
Given that the module is recognized by the drive, let’s go to parameter 236 and set
it to a 16 to tell analog input 2 it will be used as the setpoint.
Now we can go to parameter 19 to verify that the drive sees the raw analog input.
Looks like we can go from zero to 97.7 percent.
That’s good enough for this demo, but if we wanted to we could tweak the gain of the
analog input to get the full 100%.
I’ll put this back near the center of the range.
Let’s go to parameter 920 to tell the PID application to retrieve the setpoint from
analog input 2.
Now if we go to parameter 911 to view the setpoint in engineering units, we can verify
that the PID application sees the setpoint and it is at 6.49 psi.
We can vary that over the range, and let’s start out right at 6 psi.
Switch to run … and sure enough, the PID application adjusts the motor speed to get
the system to 6 psi.
I’ll put the setpoint at 5.5 psi.
But look – the actual system psi is only 5.35 psi.
Why is that?
Well, it’s because we optimized our system for 6 psi and since our system isn’t linear
the farther away we get from 6 psi the greater the deviation will be.
That’s no big deal, because we can simply rotate the potentiometer to get what ever
system psi we want.
If I take it back to 6 psi, sure enough the system levels off right at 6 psi.
The setpoint can also come from the WEG Drives built-in electronic potentiometer feature.
Digital inputs 3 and 4 are used to increment and decrement the setpoint with switch closures like you would see on a modern electronic appliance where you press an up or down arrow
to change something.
I’m using this joystick which is really controlling two switch closures.
One closes when I push up on the joystick, one closes when I push down.
You can use any kind of switch closures you want, I chose this one because I had it laying
around and it was something a little different.
Let’s go to parameter 12 which shows us the status of the digital inputs.
Push the joystick up, and yep the third bit lights up giving us a 6 and if I push the
stick down, the 4th bit goes active which gives us a hexadecimal A. Perfect.
We now know we wired it correctly.
Parameter 265 is where we tell digital input 3 he will increment the potentiometer and
parameter 266 is where we tell digital input 4 he will decrement the electronic potentiometer.
Of course we need to go to parameter 920 and tell the PID application to use the electronic
potentiometer for the setpoint.
If we go to parameter 911 we see that the electronic potentiometer defaults to the minimum
process variabe value we put in parameter 922.
I’ll hold the joystick up to scroll to 6 psi. Toggling the joystick just increments
or decrements the value one at a time.
Looks like everything is working so let's switch to run and the PID application automatically
adjusts the motor speed to get us to 6 psi.
And of course I can change the setpoint using the joystick to increment or decrement the
electronic potentiometer.
And again, if I just toggle the joy stick the setpoint just increments one digit at
a time.
Finally, you can have up to 4 predefined setpoints which you select using digital inputs 3 and
4.
The wiring is exactly the same as the electronic potentiometer we just did, but this time I’ll
use discrete switches to enable each bit.
Let’s go back to parameter 12 to view the digital input status again.
This time I’ll disable the auto-manual switch so it’s easier to read the results.
Sure enough, this switch controls digital input three and this switch controls digital
input four.
Perfect.
Looks like I wired it correctly.
I’ll turn both switches back off and enable auto mode so PID automatically controls the
motor when we switch to RUN.
So let’s go to parameter 265 to tell digital input 3 he will be the least significant bit
of our selector and parameter 266 to tell digital input 4 he will be the most significant
bit of the selector.
And let’s go back to parameter 920 to tell the PID application to use digital inputs
3 and 4 to select setpoint values from a table.
Now we’ll go to parameter 912 to enter the first setpoint.
How about we make that 5 psi.
Parameter 913 is the second value – we’ll make that 5.5 psi.
Parameter 914 is the third value so well make that our usual 6 psi.
And parameter 915 is the fourth value so we’ll set that at 6.5 psi.
OK, let’s go back to parameter 911 where we can see the setpoint value.
Both switches are off and sure enough, we get the 5 psi we put in that first table entry.
Turn on digital input 3, and we get the 2nd value in the table.
Turn that off and turn on digital input 4 and we get the third value in the table and
turn them all on and we get the last value in the table.
Perfect.
Let’s go back to 6 psi and switch to run.
And of course, the PID app takes the system to 6 psi.
I’ll turn both switches off to get 5 psi, but the system goes to 4.7 psi.
Why?
Well, again, we optimized PID to work at 6 psi, but because our system is non-linear
the farther away from 6 psi we get the less accurate it will be.
We could go back and optimize the system using the techniques in this video, but it is whole
a lot easier to just tweak the setpoint values in the table.
So, let’s go to the first entry and modify it until we get 5 psi in our real system.
Great, let’s turn on digital input 3.
And as the system settles out at the new setpoint we see it’s off a little bit too.
So I’ll just go to the next table entry and tweak that to get the actual system pressure
to 5.5 psi.
Of course if we enable digital input 4 only we get our 6psi.
And if we enable both digital inputs we see the system doesn’t settle out at 6.5 psi
, so I’ll go to that entry in the table and tweak it until we get 6.5 psi.
So now I can quickly dial in 5 psi … 5.5 psi … 6 psi .. and 6.5 psi.
And let’s finish up back at 6 psi.
Now, of course, this would normally be controlled by a PLC or some other controller.
We’re just using the switches here for demo purposes.
One side note.
All of this all assumes you have the PID app running.
You should see a 1 in parameter 903 which says you are using the PID application and
not a user application.
And you should see a four 4 in parameter 900 which says the PID application is running.
If it isn’t running, go to parameter 901 and set it to a 1.
You now know several different ways to control the setpoint on a WEG variable frequency drive.
Click here to see all of the videos in this series.
Click here to subscribe to our YouTube channel so you will be notified when we publish new
videos and click here to learn about AutomationDirect’s free award winning options.