cant get PIDs to work in Auto

sparkytex

Lifetime Supporting Member
Join Date
Jun 2013
Location
Port Hardy B.C.
Posts
354
So I'm commissioning a new system at our plant. We upgraded our old panel view 1200's to some new touch screens with wonderware. I'm using a PLC 5/40 Ethernet processor. The old processor was only capable of DH+ and we wanted to communicate via Ethernet with wonderware so we upgraded to the 5/40E processor. I've established communications with the PLC with RSLogix 5 and with wonderware.

Everything I programmed in wonderware seems to work but the PID controls are giving me grief. Currently I have the PID control in manual and am able to set an output manually with wonderware. I can see the process variable updating and all is good until I switch the PID back to auto mode and the control variable's "output %" goes to zero and nothing happens even though the PV is updating an a process error is registering as well as a setpoint but the CV will not change.

when in auto the PID says

A/M station mode - auto
software A/M mode - auto
mode - auto

I just cant seem to figure out why it would work fine in manual but as soon as its put into auto a zero seems to be written into PD80:8.SO's value

I attached a copy of the program
 
you have several "issues" with your PIDs - but according to the file you posted, the problem that you're currently working on seems to be related to the fact that you have the P, the I, and the D settings for that particular PID all set to ZERO ...
 
Last edited:
you have several "issues" with your PIDs - but according to the file you posted, the problem that you're currently working on seems to be related to the fact that you have the P, the I, and the D settings for that particular PID all set to ZERO ...

Unfortunately another person has done all the PLC programming in the past for this and has since quit. I'm at home now, but first thing tomorrow i'll have a look at this. Thanks for the help, i'll post again tomorrow!

cheers,
 
This has just been a nightmare, The guy who programmed this has really messed up a ton of stuff. I cant even begin to describe how much I've had to fix. I seem to have gotten almost all of the 9 PID controls on this program to work except 2 of them. The first one is "LIC_7020" (PD80:6) I can write a value in manually and I can see it change no problem. As soon as I put the PID in auto, the CV automatically goes to 100% regardless of the SP value. I even wrote a zero in the SP value and it still just jumps straight to 100% open in auto.

The second is "LIC_7016" (PD80:4). It works fine in manual but as soon as you put the PID into auto it goes straight to zero regardless of the SP value.

I've been spending hours trying to figure this all out, if any one could help me figure this out I'd be much appreciative. I attached the program again after some of the edits I have made.

Thanks
 
I'm swamped right now - but based on your latest post, here are a couple of items that look very suspicious ...

you really need a more systematic approach to this over the long haul - but the settings that I've mentioned MIGHT be helpful to tinker with ...

DISCLAIMER: we need to know more about your system (valve action. etc.) in order to do a more detailed analysis ...

.

pid_st_b.jpg
 
The two things that Ron is pointing out are:

in the top image the output "action" is what is commonly referred to as "reverse acting". That is, if the actual value is above the setpoint the output will increase. This is what you would need for a cooling loop, for example.

The second image shows an EXTREMELY short integral time. This will cause the integral sum to wind up to a full output almost immediately. Relative to many of the common tuning methods this would indicate that your system has a 3 millisecond time constant. That is unreasonably low for anything controlled by a plc. Even 0.1 would be pretty low for your system. Keep in mind that with integral time the LOWER the setting the MORE AGGRESSIVE the integral correction.

Keith
 
Ron, I couldn't agree with you more. Problem is this whole project was completed by another person who has left. Now that the new processor/program and touchscreens/wonderware are installed and not working its on me to figure it out (lucky me). I'm still a very green programmer with little formal training and almost everything I learn is from trouble shooting and being forced to figure it out.

I have to go out to the field and figure out how all these control systems are intended to work so I know for sure if the control action needs to be PV-SP or SP-PV. but I also got lucky and found the old processor which has all the values plugged into the PID's for the old "working" system and sure as rain the integral value is that low for PD80:6 on the original processor. PD80:4 is programmed on the old program to be PV-SP so it must be right because the old system never had an issue.

There is however ton's of addressing errors on the new program that I'm trying to weed out hoping I can get this system working during our scheduled shutdown for maintenance. I'm very grateful for all the help, I would be screwed without the help from you guys honestly, thanks
 
Also how do I change the "online name" of the processor on RSLynx. right now it just displays the IP address and the PLC processor model. You'll notice in AB_ETH-1 that all the processors are labeled corresponding to their processor name. But in AB_ETH-2 only the IP address's are named. 223.103.41.159 is the "BSR" processor and I would like it to display its processor name in RSLynx and if possible have it in AB_ETH-1 driver with the others.

I attached a image that might help

BSRRSLYNX.jpg
 
the old processor which has all the values plugged into the PID's for the old "working" system and sure as rain the integral value is that low for PD80:6 on the original processor.

well, from what I've seen of your system so far – here's what's happening with the Integral settings ... in the first file that you posted, SOME of the PIDs were set up (incorrectly) to execute on every alternate program scan (note the use of the ENABLE bits) ...

in the second file that you've posted, you've changed SOME of the PIDs to work (more correctly) by using a TON instruction's DONE bit to "trigger" the PIDs on a time-based arrangement ... (note that the PD80:6 that you mentioned had this type of "timing" change) ...

but ...

the Integral (and also the Derivative) actions are based on units of "time" ... that means that you can't just plug the previous (fast scan) settings into your new (slow scan) arrangement and expect the PIDs to work the same way that they used to ... (Hint: you'll need to retune the affected PIDs) ...

analogy:

suppose that you had 12 inch tires on your car and the speedometer worked OK ... then you switched to 24 inch tires ... you're going to have to change "something" in your speedometer system to compensate for the "more-distance-per-revolution" – or you're going to have major errors in your speed reading ...

also ...

in the first file, SOME (but not ALL) of your PIDs were set up using the Independent equation ... others used the Dependent equation ... in your second file, you have ALL of the PIDs set up to use the Dependent equation ... there's a lot to be said for "consistency" – but the fact is that changing the type of equation also changes some of the tuning rules ... specifically, the rule that Keith gave you: "lower Integral setting – gives more aggressive Integral action" is indeed correct – but only for the DEPENDENT type of equations that you are now using ...

but ...

for the INDEPENDENT type of equations – the rule is REVERSED – and (worst of all for your particular situation) the scaling of the Integral and the Derivative settings are not one-for-one either ... (think: "skewed") ...

so ...

once again, here's a situation where you can't just simply plug in the "old" numbers from a previously working system into your new set up ...

anyway ...

I hope that this has been helpful ... I've got to get back to work now ... good luck with your project ... be safe ...
 
Last edited:
the old Processor used to connected VIA DH+ communications and was quite slow. The new processor is now running on internet IP communications and is a lot faster. Reading your last reply I'd imagine the old integral value for the previous processor was set so fast acting due to the fact that scan time was a lot slower.

Almost all of the PID equations are set to be "independent" except for 7016 and 7012. I am personally familiar with tuning PID's set up for "dependant" style equation. Maybe being consistent with what I know, I should change them all to dependant so when it comes time to re-tune during start up I'll be a lot more efficient at it.

Ron and Keith, I am very thankful you guys took the time to help me out with my issues. I'm working towards getting this going on the right track safely.

cheers, TEX
 
Reading your last reply I'd imagine the old integral value for the previous processor was set so fast acting due to the fact that scan time was a lot slower.

maybe we're just not understanding each other – but I think that you've misinterpreted some basic concepts behind how the PLC-5 platform handles its PID instructions ...

(note to other readers: the following explanations are DIFFERENT in the SLC/MicroLogix platforms) ...

I've knocked together a simple demo program (attached to the next post) ... a trend graph is shown below ...

(1) suppose that we take THREE separate PID instructions – but "aim" them all at the same "dummy" input (PV is set for N7:54) ...

(2) suppose that we manually set the input for 40% of full scale – and manually set the setpoint for all three PIDs for 50% ...

(3) we'll set the Proportional gain for all three PIDs for 1.00 ...

(4) we'll start our demo with the Integral settings for all three PIDs entered as 0.00 – so that the Integral action is turned OFF ...

(5) we won't mess with Derivative at all in this particular demo ...

(6) we'll let the graph run for a few seconds – and the CV (output) for all three PIDs will settle down at 10% of full scale – due to the Proportional action ... notice in the graph that the GREEN line, the YELLOW line, and the RED line are all superimposed at the left side of the graph ...

(7) when everything is ready, we'll toggle our "test" bit ON ... this will turn ON the Integral actions for all three PIDs as follows ...

(8) PD11:1 will have its Integral setting entered as 0.2 ... this PID is using a DEPENDENT gains equation – and the execution of the PID is being correctly "triggered" by a Timer's Done bit ...

(9) PD11:2 will have its Integral setting entered as 0.083 ... this PID is using an INDEPENDENT gains equation – and the execution of the PID is being correctly "triggered" by a Timer's Done bit ... note that the value 0.083 being used for this INDEPENDENT equation has been calculated to correspond with the value 0.2 used for the previous DEPENDENT equation ...

(10) note in the graph that the GREEN line and the YELLOW line remain superimposed as the graph continues – which means that both of the first two PIDs (both DEPENDENT and INDEPENDENT) are giving the same output signals ...

(11) PD11:3 will also have its Integral setting entered as 0.083 just like PD11:2 ... this PID is also using an INDEPENDENT gains equation ... BUT ...

(12) this time the execution of the PID is being INCORRECTLY "triggered" by using an XIO instruction tied to the PID's own Enabled bit ... (look familiar?) ... now look at the response of this PID as shown by the RED line ...

(13) this "pedal-to-the-metal" response is the result of executing the PID instruction MUCH TOO RAPIDLY – which causes the Integral action to increase too fast ...

(14) as near as I can tell from what you've posted so far, your original programmer made this type of "triggering" mistake – and tried to compensate for it by entering an extremely SMALL value for the Integral setting ... (this is a VERY common practice) ...

.

DEMO_I.PNG
 
Last edited:
here is a PDF printout of the simple program I used to make this demonstration ... I recommend that you come up with a spare system – and make your own PID experiments along these lines ...

SUGGESTION: post your original program ... specifically, the one that was "sort-of-kind-of" running before you made any conversions at all ...

.
 
Last edited:
ok, that makes a lot of sense now. Being that the PID's were triggered incorrectly it acted way to aggressive so the programmer tried to slow down the reaction time by trying to enter an insanely low integral value to compensate. The only reason I'm able to work with PID's in any way is because I've read your explanation and breakdown of each part of the PID. I wish you weren't so far away because I'd take your course in a heartbeat, I'm a big fan of the methods you use to teach.

I've set all the PID's to dependant because It's the only type of equation I've tuned before. Come start up I'll have to tune all the loops again, but hey it's good practice and lord knows I need all I can get. I attached the original program that corresponds with the old Panel View 1200's. I'll also attach the current running program that I've been working on

1.) old program - "BSR"
2.) current program - "BSR-2014-6-19"

Thanks again ron!

p.s. any hints on how to change the online processor name in my post from 12:37 yesterday?
 
I'm not 100% sure that I understand what you're asking for – but you could TRY this ...

configure your AB_ETH-1 driver and click "Add New" ... then type in the IP address of your PLC-5 ...

note that the Ethernet driver (AB_ETH-1) and the EthernetIP driver (AB_ETHIP-2) are NOT the same thing ...

secret handshake: in situations where the "EtherNet/IP Driver" won't work at all – often the "Ethernet devices" driver will ...

it will be several days before I'll have a chance to look at your programs again ... good luck with your project ...
 

Similar Topics

I have a sysmac omron plc C200H CPU01,only the power led is ON,using CX-ONE programmer software, and connecting to the plc via Host link LK202-V1...
Replies
2
Views
738
Good morning, we have a lot of coolant mist around our machines and sometimes the fans on the drives inside our electrical cabinets will suck the...
Replies
7
Views
1,331
I cannot get CCW to add a controller, i keep getting a error message saying that the device is not authorized. This happens with any model and...
Replies
1
Views
1,438
Hey guys, Frustrating issue here. I have one particular PC with Proficy 8 installed that no matter what I try, I cannot get the variable...
Replies
6
Views
1,456
Hello Everyone i got a problem with Endress Hauser FlowMeter Promag W400, in his specification says it support Ethernet/IP protocol...
Replies
4
Views
1,827
Back
Top Bottom