PID control (PLC5)

jeffblichmann

Member
Join Date
Aug 2012
Location
Wisconsin
Posts
5
I had an issue with my PID control in a PLC5 today. I'm using it to keep the humidity above a certain setpoint I have the input card set up to a raw min of 0 and a raw max of 100 (the block transfer read). In the PID configuration, engineering units are 0-4095, input range is 0-100. The block transfer write of the output module is 0-4095.
We recently lost power to the PLC. When power came back on, we found the PID wasn't controlling correctly, even though the process variable was below the setpoint according to the panelview.
When I went online, I found the input to the PID was 19% as expected. But opening up the PID dialog box, the process variable in the status window said 798 (about 19% of 4095). I then went to the input max/min of the PID dialog box. I changed the max to 4095, then back to 100, and then the process variable changed back to 19 as it should have been.
Any ideas why the dialog box would have shown 798 when it was actually 19? And why changing the settings then changing them back would reset that? How could I avoid this happening again?

Thank you.
 
It doesn't sound like you have your scaling correct. The Analog Input Card should be 0-4095, and then do the scaling in your PID Block for actual Engineering Units. This is going to make it very hard for the PID to control properly.

If you are permitted, post your PLC Code (Zip it First), and we can have a look at it for you.

Stu....
 
I don't think I'll be able to post the code. I think after I changed the input range in the PID block, and then changed it back again, the PID is controlling correctly now. I see what you're saying about the scaling, but since it's working now, I'm not sure if that's the cause of the initial issue. Unless when the PLC started back up after the power loss, it tried to reset to the values as you described. I've also recently read that the scaling shouldn't be changed while the process is running as it could cause a processor fault. I'm hoping to find a fix that won't require me to change the scaling because this process the PLC controls doesn't go down very often for me to have the opportunity to make a change.
 
When you lose power on a 1771-IFE card (the normal analog input used with PLC-5), it loses it's configuration. The PLC program is responsible for configuring the card on power up. There should be a BTW instruction doing this. Sounds like it didn't happen correctly on your power outage.

Also, if someone changed the config data for the card while the system is running and saw no effect, they might have left it that way. Next power cycle, changes go into effect. This assumes the BTW only operates on power up.

BTW scaling to anything other than 0-4095 on the card is throwing away resolution. If you scale it 0-100 on the card (I expect that is 0-100% RH), then that means your signal jumps in 1% increments. i.e. increasing humidity from 49% to 50% has no intermediate values.
 
Last edited:
I do have a BTW that should be configuring the 1771-IFE. I believe when I first added it, I inserted the card into the IO configuration and it automatically generated rungs for BTW and BTR. Is there anyway to ensure that the BTW runs on power up?

What you're saying about the resolution makes sense to me. I would like to change this now that I know, but I don't want to risk the processor fault. For what we're doing, 1% increments is okay, but I'll keep your suggestion in mind.

Thanks.
 

Similar Topics

I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
583
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
919
How can I connect PID Output to a valve. In ladder logic program is there any logic do I want to add between valve and PID? PV=SP What will be the...
Replies
7
Views
406
I am setting up control for Hypochlorite dosing. The easy part is the dosing calculation for flow pacing but I would also like to setup trimming...
Replies
8
Views
940
Hey guys! I'm a newbie in the control area, so I'm gonna drop some thoughts here... We want to control the opening of big silos (about 1900...
Replies
6
Views
1,482
Back
Top Bottom