I have been struggling pretty bad with setting up a PID loop for my existing ControlLogix controller.
And immediately after this project, I need to set up another loop on a CompactLogix controller. I'll explain both systems, then get in to where I am having issues.
ControlLogix:
CV: Control the Speed of extension of a Hydraulic Cylinder (4-20mA signal over DeviceNet, controlling a Proportional Valve)
PV: Encoder on the Cylinder, measuring the absolute distance. Using the PLC to determine the average velocity of this extension (Quadrature Signal coming in on my 1754-HSC/B)
Control: Create a constant speed of extension during a Boring operation.
CompactLogix:
CV: Control the Position of extension of a Hydraulic Cylinder (4-20mA signal on my 1769-OF8 Analog out card)
PV: Pressure transducer on the Inlet side of a Hydraulic motor at the end of my cylinder (4-20mA signal in on my 1769-IF8 Analog in card)
Control: As the pressure rises at the inlet, raise the cylinder.
These two systems are NOT part of the same project, they just coincide at this particular time. I haven't had a look at testing my CompactLogix code yet, because I can't get the ControlLogix PID to work... Solve one problem, then the next will be a cake walk, right?
Alright, so my struggle comes from setting up my PID to respond at all...
When I turn on my system, give it a Velocity to tune to, the PID loop turns on the output to 100% (unless I cap my CVmax) for a bit, then turns it to 0% for a bit. Maybe 0.5 seconds on either side, sometimes it holds high for longer, sometimes for shorter. I have Trended my responses on my HMI so I can see what it looks like, and it is just wrong. The cylinder itself jolts down ~0.5inch, then stops, then jolts... As I would expect from the outputs I am observing too.
So I have been searching high and low for ANY sort of GOOD documentation on PID tuning with Allen-Bradleys... Nothing to be found. I see a lot of posts by Ron Beaufort, but nothing that explains what any of these Parameters in the PID are actually looking for.
Boiling this down to a few pointed questions, and please ask me for more so I can rectify this sooner rather than later:
1) Ron explained that I need to add a Timer in front of my PID loop. One AB manual says that it is necessary too, but to me it makes no sense. I have a Parameter called: "Loop Update Time: __seconds" Shouldn't this parameter tell the PID when to change the value, and when to hold..? Seems counter intuitive. For now, the Timer is in, but I don't understand.
2) Scaling values... Do I need to pre-scale my values, and leave the Parameters in the PID control at their defaults? Again, Ron has some posts talking about the NECESSITY of scaling your PV to the PID, then post-scaling the CV to the AO card.
PV: 0.000-0.400 inch/sec
CV: 0-3276 counts (as determined in the DeviceNet card, I only need operation in one direction, then I offset it manually later because the PID loop won't accept true values. ie. 1658-4954 is the real range that I need to operate, with 1658 being fully open)
Engineering Unit Max/Min, what is this value for?
Compared to Unscaled Max/Min?
3) In my world, I program Mitsubishi controllers primarily. Their documentation is EXCELLENT, and their tech support is free from my VAR, just a really experienced programmer. Any time I call AB, the end result is "We don't know, you will have to figure it out on your own," so why do I pay for TechConnect...? Their solution for my PIDs was this "You just enter the Parameters, and it will work. There is nothing else to it." And "Scaling values will scale your PID" thanks Tips, but it still ain't working.
Is there a good online database with documentation that actually explains how some of these instructions work?
The "best" section of the Help files for AB is this:
I don't exactly carry around my Textbook from my PID course I took several years ago. And I don't always have an internet connection when I'm on site. These help files are brutal, I need something better, that can actually give me insight as to what I am doing. My solution was to actually look at my Mitsubishi manual that has these same options, but it reminded me of what these settings actually control. None of which I need in my particular installation, but I wouldn't have known without these other manuals.
And just because I have only experienced this level of frustration with Allen-Bradly, here is an interesting problem I came across last year:
I had a 1769-L32E controller that was running some new code. This was a brand new installation, and I was about 3 days in to testing, right in the middle of a sequence, the Cart stopped dead in it's tracks. I checked all the breakers, fuses, overloads, estops... everything was fine. So I went online to the controller and got the standard message "No Program detected. Would you like to Download to the Controller?" I didn't trust that particular CPU, so I returned it to my vendor for another brand new one, then flashed the Firmware and Downloaded... 1 full day wasted basically. After commissioning, this exact problem occured again about 3 months after. I had to fly out to site to get online and Download the code back in to the controller. AB's solution was "Install an SD card with your code on it in case this happens again." To me, this should NEVER HAPPEN. Am I wrong?
And immediately after this project, I need to set up another loop on a CompactLogix controller. I'll explain both systems, then get in to where I am having issues.
ControlLogix:
CV: Control the Speed of extension of a Hydraulic Cylinder (4-20mA signal over DeviceNet, controlling a Proportional Valve)
PV: Encoder on the Cylinder, measuring the absolute distance. Using the PLC to determine the average velocity of this extension (Quadrature Signal coming in on my 1754-HSC/B)
Control: Create a constant speed of extension during a Boring operation.
CompactLogix:
CV: Control the Position of extension of a Hydraulic Cylinder (4-20mA signal on my 1769-OF8 Analog out card)
PV: Pressure transducer on the Inlet side of a Hydraulic motor at the end of my cylinder (4-20mA signal in on my 1769-IF8 Analog in card)
Control: As the pressure rises at the inlet, raise the cylinder.
These two systems are NOT part of the same project, they just coincide at this particular time. I haven't had a look at testing my CompactLogix code yet, because I can't get the ControlLogix PID to work... Solve one problem, then the next will be a cake walk, right?
Alright, so my struggle comes from setting up my PID to respond at all...
When I turn on my system, give it a Velocity to tune to, the PID loop turns on the output to 100% (unless I cap my CVmax) for a bit, then turns it to 0% for a bit. Maybe 0.5 seconds on either side, sometimes it holds high for longer, sometimes for shorter. I have Trended my responses on my HMI so I can see what it looks like, and it is just wrong. The cylinder itself jolts down ~0.5inch, then stops, then jolts... As I would expect from the outputs I am observing too.
So I have been searching high and low for ANY sort of GOOD documentation on PID tuning with Allen-Bradleys... Nothing to be found. I see a lot of posts by Ron Beaufort, but nothing that explains what any of these Parameters in the PID are actually looking for.
Boiling this down to a few pointed questions, and please ask me for more so I can rectify this sooner rather than later:
1) Ron explained that I need to add a Timer in front of my PID loop. One AB manual says that it is necessary too, but to me it makes no sense. I have a Parameter called: "Loop Update Time: __seconds" Shouldn't this parameter tell the PID when to change the value, and when to hold..? Seems counter intuitive. For now, the Timer is in, but I don't understand.
2) Scaling values... Do I need to pre-scale my values, and leave the Parameters in the PID control at their defaults? Again, Ron has some posts talking about the NECESSITY of scaling your PV to the PID, then post-scaling the CV to the AO card.
PV: 0.000-0.400 inch/sec
CV: 0-3276 counts (as determined in the DeviceNet card, I only need operation in one direction, then I offset it manually later because the PID loop won't accept true values. ie. 1658-4954 is the real range that I need to operate, with 1658 being fully open)
Engineering Unit Max/Min, what is this value for?
Compared to Unscaled Max/Min?
3) In my world, I program Mitsubishi controllers primarily. Their documentation is EXCELLENT, and their tech support is free from my VAR, just a really experienced programmer. Any time I call AB, the end result is "We don't know, you will have to figure it out on your own," so why do I pay for TechConnect...? Their solution for my PIDs was this "You just enter the Parameters, and it will work. There is nothing else to it." And "Scaling values will scale your PID" thanks Tips, but it still ain't working.
Is there a good online database with documentation that actually explains how some of these instructions work?
The "best" section of the Help files for AB is this:
Code:
No derivative smoothing Enable or disable this selection (.NDF).
No bias calculation Enable or disable this selection (.NOBC).
No zero crossing in deadband Enable or disable this selection (.NOZC).
PV tracking Enable or disable this selection (.PVT).
Cascade loop Enable or disable this selection (.CL)
And just because I have only experienced this level of frustration with Allen-Bradly, here is an interesting problem I came across last year:
I had a 1769-L32E controller that was running some new code. This was a brand new installation, and I was about 3 days in to testing, right in the middle of a sequence, the Cart stopped dead in it's tracks. I checked all the breakers, fuses, overloads, estops... everything was fine. So I went online to the controller and got the standard message "No Program detected. Would you like to Download to the Controller?" I didn't trust that particular CPU, so I returned it to my vendor for another brand new one, then flashed the Firmware and Downloaded... 1 full day wasted basically. After commissioning, this exact problem occured again about 3 months after. I had to fly out to site to get online and Download the code back in to the controller. AB's solution was "Install an SD card with your code on it in case this happens again." To me, this should NEVER HAPPEN. Am I wrong?