SLC 5/03 pid BLUES

[email protected]

Lifetime Supporting Member
Join Date
Oct 2004
Location
east Coast
Posts
44
could anyone pleaseexplain where I am to enter my PV for my PID loop?

I have my I:4.0 pushed to F8:0 then SCP'd to f8:1 for scaling display to my touch screen (AUtomation Direct EZ-Touch) I used an Float because it is a type T thermocouple -327 to +760F

I then MOV F8:1 to N7:22 and in my PID block I entered N7:22 for my PROCESS VARIABLE

But when I am online the number scaled and displayed correctly in the ladder AND on my touchscreen BUT has nothing to do with process variable in the PID setup screen???

I tried moving the value to the 14th word in the PID block to pre scale but I just don't know what I'm doing.

Set-pt works fine. And output tracks in ladder and on touch screen.
except that is is almost always at 100%.

and SCALED ERROR is the calculated difference of SETPOINT MINIMUM and SP ??????
 
I'm on the road this week, so I don't have my normal "stuff" with me, but I believe this will work.

1. You need to scale your input for PID, read up on the PID instruction, it is expecting a certain count range.
2. Use this scaled value as your PV.


Ken
 
The "Process Variable" or PV should be an integer value in the range of 0 to 16383. I typically use a "Scale with Parameters" or SCP instruction with the PID. I'll use a floating point value for the SCP input and an integer for the output. The SCP scaled min and max are 0 and 16383 respectively. Then the integer output of the SCP is the PID process variable.

So in your case, if F8:1 is scaled to something other than 0 to 16383, you will want to scale either F8:0 or F8:1 to N7:22 using an SCP where Scaled Min = 0, Scaled Max = 16383, and Output = N7:22. Then use N7:22 as the PV for the PID instruction.

By the way, the "Control Variable" is also an integer in the range of 0 to 16383.

And follow Ken's advice and check the on-line help file.
 
... and if you'll post your .RSS file, we'll be happy to take a quick look at it and see if we can help identify any specific "gotcha" issues ...

link on "how to post a file" just in case you need it

can you tell us exactly what type input module you're using? ... and what will be a typical range of values (in degrees F) for your application? ... it's a pretty safe assumption that -327 to 760 is probably not the normal range of values your system will be dealing with ...

point: we MIGHT be able to recommend some mathematical tricks to improve your system's resolution and response if you can give us more details about your application ... hint: suppose that your process normally operates in the range of 70 to 500 degrees F (example: from room temperature to something suitable for an oven) ... if you just “plug-and-play” with the thermocouple’s full –327 to 760 degree input range and simply convert it to the customary 0 to 16383 range for the PID, look at what happens ... at the lowest input value of 70 degrees, the PID will see an input of 5983 ... at the highest input value of 500 degrees, the PID will see an input of 12464 ... 12464 minus 5983 equals 6481 ... 6481 divided by 16383 equals 0.395 and change ... basically then, all of your PID’s response will be limited to only about 40% of its “full scale” range ... specifically, the PID will never “see” an input either above or below a 40% band of its available range ... more specifically, about 60% of the PID’s available range is “wasted” and unavailable for control purposes ... now in many application this won’t amount to anything serious ... but in SOME applications this will give “clunky” control ... so one specific question would be: does your input module support a “scale for PID” setting? ... if it does, then you might want to consider letting the module provide a “raw” input value which ranges from 0 to 16383 at I:4.0 ... and then rescaling the data for the operator’s interface to accommodate that new range of values ... major concept: the address I:4.0 is an integer ... it can represent the value “98” (as in degrees F) ... but it cannot represent “98.6” (as in normal body temperature) ... so in most cases, the “raw” range of 0 to 16383 (assuming that it’s available with your module) usually gives better control than a “scaled-to-degrees-right-out-of-the-module” value ... and for completeness, note that some modules provide an “engineering units X 10” scaling feature ... does yours? ...

of course all of this is pure speculation at this point ... we don’t have enough detailed information about your particular application to give you any specific advice ... but the more detail you can give us, the more detailed the advice will be ...

and finally ... a little personal background information might help us to help you better ...

so ... are you already familiar with PID in general? ... is this your first "SLC" PID experience? ... are there any pre-existing PID loops in this same program? ... do you already know how to "tune" the loop? ... are there any safety concerns that we need to consider? ... do you already know how to handle an operator’s input for things such as “manual” to “automatic” control? ... what is your deadline on this project? ... please note that "As Soon As Possible" is not a valid answer ...
 
I just updated the HotRod.zip

It has information that Ron and I have provided about MicroLogix and SLC Temperature PID control over the last month. It has Ron's example of scaling and analog input card on a SLC. I have added a HotRod simulator for the SLC. The new example use Atod or PID counts to do control instead of tenths of degrees.

See the download/misc area.
 
As mentioned earlier you have to scale using the SCP (or SCL for the unfortunate). Sounds like you have done this already. Great, wonderful, fabulous, but you aren't done yet.

The PID requires you scale what comes into the instruction, but once you are there you will want to scale it into engineering units. This is what the SMAX and SMIN fields are for. Enter your scaled max and scaled min and you should be ready to go.

Make sure you read up on the PID instruction though.

OG
 
re: pid blues

Thanks for all your help.

I have been on the road and haven't even opened my logix 500 to cut and paste any ladder to this forum.

Now I'm sure it's a scaling issue but your point is well taken, even when I have proper scaling my resolution isn't too good if my type T t/c is -340 to +700 and my control range is -200 to +80'F
 
Last edited:

Similar Topics

Hi everyone, yet another PID problem. I'm hoping I understand enough of the process I'm controlling that my request for help is reasonable. If a...
Replies
113
Views
28,598
How can I test some PID code I have written for a SLC-500 in RSLogix500, without having an actual processor to test on. I have used Emulate500 to...
Replies
3
Views
1,844
Hello, I have a PID block in my program controlling pump speed in order to get a correct Differential pressure. The way I have it set up is the...
Replies
3
Views
1,281
I have a PID in a SLC 500 that does not function as it should. Have deleted it remade it and still have a problem also moved it up and down in the...
Replies
13
Views
2,764
Hi all, Came across some examples today of PID instructions in an SLC 5/04 with the Setpoint (SMax) & Setpoint (SMin) both set to zero. In...
Replies
2
Views
1,978
Back
Top Bottom