PID RSLogix 500 PV shows zero?

Thor Hammer

Member
Join Date
Jan 2014
Location
Santa Cruz, CA
Posts
36
So this is rather strange. I have 3 PID loops in my program and they all show zero for the process value when in operation so its setting the output to max.

N7:4 is the setpoint as entered on the HMI
N7:22 is the process variable scaled. Its pressure in a vessel to control pump speed. Right now its at 13 psi.
N7:54 is not used. Its just there as I am using the CVP address of the PID.

Any help greatly appreciated. Have not run into this before. I have no errors in my program. Ugh!

Here is a screen shot

Untitled.jpg
 
So I am new to AB plcs and figured out I needed to use the raw address value (0-16383) in the PID process value field. Once I did this then the process value started working. I have a lot to learn still. Any feedback greatly appreciated. I have been lurking on this forum for a while and love it.
 
so – you've made changes – and the RSS file that you've attached is now a "working" version ... correct? ...

excellent ...

if I'm interpreting what you've posted so far correctly, the value of N7:22 was originally being "scaled" into a range of 0 to 30 ... that means that when the PID saw its PV (input) come in at a maximum of 30, it (the PID) would accept that as 30 divided by 16383 giving an input signal of 0.0018 ... naturally that would be rounded off to ZERO ...

the only other "unorthodox" thing about your setup that jumps right out is the use of the PID's CVP (Control Variable Percent) instead of the CV (Control Variable) as the PID's output signal ...

yes, you ARE scaling the CVP into a range of 0 to 16383 before you send that to your output module – which is good ... but ... the potential issue is that you're only going to get about 100 steps of resolution that way ... in other words, your PID's output will be "chunky style" ... on the other hand, if you were to use the recommended method of sending the CV to the output module, you'd get about 16383 steps of resolution ... "smooth style" ...

in your application, the reduced/limited resolution might be perfectly OK – but in other applications the PID's "step-step-step" operation might be very noticeable – and potentially detrimental to the machine's operation ...

plus – (even if it works) it just plain "looks funny" ...

I haven't had a chance to dig through it - but basically your program looks pretty doggone good ...
 
Last edited:
I had no idea about the resolution. It was recommended to use the CVP by a trusted mentor. :oops:

So if I read you right then I need to use an integer address for the control variable and scale it for better resolution? thank you for the feedback!
 
So if I read you right then I need to use an integer address for the control variable and scale it for better resolution?

well, it should be easier than that ... try this approach ...

you've already got your analog output module set up as "scaled for PID" ... (that's perfect) ... now just type in the output channel's address for the Control Variable when you enter the PID rung instruction (for example: O:6.0) ...

when your PID is in the AUTO mode, the CV output of the PID will be a value which ranges from 0 to 16383 ... that should make the analog output module give you a signal which ranges from 4 to 20 mA ...

then when you put the PID into the MANUAL mode, use an SCP to take the HMI operator's signal from a separate integer (or floating point) location - and scale that value into a range of 0 to 16383 ... feed the result of the SCP directly into the O:6.0 address ... once again, a 4 to 20 mA response should result ...

basic idea: the "Scaled for PID" settings for the newer analog input and output modules were developed because so many programmers were having problems with the PID scaling ... you might as well make use of the feature – when it's available ...

I had no idea about the resolution. It was recommended to use the CVP by a trusted mentor.

well, cut him some slack ... that approach might have worked perfectly in the mentor's application ... as I said earlier, a "chunky style" response might be OK in some cases ... but in other cases, you might need a smoother response ... now that you're aware of the difference, you can make an informed decision about how you want to proceed ...

to be honest though – the CV output of the PID will always be a number between 0 and 16383 ... so it's hard to imagine any real advantage to using the CVP (0 to 100) and then scaling that to a range of 0 to 16383 ...

most programmers use the CVP as a handy way to provide the HMI operator with a 0 to 100% reading of what value is being fed to the analog output ... note that in the MANUAL mode, the PID will automatically scale the analog output value (0 to 16383) into a 0 to 100% range – and feed that back into the CVP location ... AS LONG AS the PID rung is left in its TRUE state – so that the PID can continue to execute even when it's in the MANUAL mode ... (no, it won't change the value in the CV location while in the MANUAL mode) ... your PID rungs are already set up as unconditional – which is correct when using RSLogix500 – and your particular platform ...

the big problem is that many (most?) programmers condition the PID's rung to go FALSE while in the MANUAL mode ... that not only defeats the purpose of the CVP readout – but it also wipes out any Integral action that the PID might have already generated ...

one more trick:

try setting the RG (Rate Gain) bit to a "1" ... that will give you an extra decimal point of resolution for your Proportional and your Integral tuning settings ...

DISCLAIMER:

many of the methods being discussed here are appropriate ONLY for the OP's type of system ... other Allen-Bradley platforms (PLC-5, ControlLogix, SLC-500, etc.) use different methods for implementing their PID instructions ... one size does NOT fit all ...
 
Last edited:
I never thought to set the loop to auto or manual for the PID or Hand mode for my analog output. Genius! I am so very thankful for the help.

Only question I have is how do I set the PID for Auto or Manual? I assume there is a specific address for both I can use an instruction in front of to turn off or on? I am just getting started and I am sure a little research in the manual will tell me what bits to turn on or off.

I am a 6 year Direct Soft PLC programmer. I can say there are advantages to both but I am really loving the flexibility of the Rockwell software.

Thank you Ron.
 
PD14:2.AM ... Right?

you got it ... but technically it's PD14:2/AM ... the software will correct the DOT to a SLASH for you if you enter it wrong ...

put a 0 in the bit/box and you'll have AUTO mode ...
put a 1 in the bit/box and you'll get MANUAL mode ...

good luck with your project ... and you're welcome ...
 
Last edited:

Similar Topics

Hi, Long time not in the forum, and not in the programming. I´m getting back. I was issued a conversion from RSLogix 500 to RSLogix 5000 (studio...
Replies
0
Views
1,301
I have 3 valves that I need to open for 1 minute every 30 minutes, but not all at the same time. I have one TON timer (Start Blowdowns Timer)...
Replies
15
Views
4,634
Hi good people I have a question regarding a program on a machines heater control, I have 3 x heater contactor controlled via a plc It looks...
Replies
5
Views
1,801
Hello All, This forum has been of great help for me As i mentioned in my earlier posts that I am a learner so pardon me if I ask silly questions...
Replies
9
Views
3,198
I am attempting to use the PID instruction in RSLogix 500, with a Micrologix 1400 PLC. I have I:2.3 (4 - 20 mA) scaled for 0 to 10000, and stored...
Replies
7
Views
6,267
Back
Top Bottom