PID Ramp/Soak with a SLC 500

mbr-dk

Member
Join Date
May 2012
Location
Copenhagen
Posts
6
I am new to the SLC 500 platform and am hoping that someone can give me some hints on how to do PID and ramp/soak with the SLC 500 and perhaps even some sample code for a PID controlled heating application with ramp/soak :)

It is for a small hobby project where I am trying to automate my home brewing (Beer) setup. I have 3 kettles with heating elements controlled by standard SSR relays (4-32 vdc) and the temperature is measured with PT100 sensors.

One of the kettles will have two fixed set points, 54 C and 78 C, depending on where in the brewing process I am, the other kettle will have 3 set points, 52 C for 20 minutes, 62 C for 40 minutes, 72 C for 40 minutes, and it is here I need the ramp/soak PID setup. The last kettle will just be manual on/off ideally with some sort of PWMing or like to control how vigorous the boil will be.

I have the following hardware for my little project:

CPU 1747-L532 5/03 Ser E OS302 Ser C FRN 6
1746-NR4 RTD/Resistance Input Module
1746-IB16 INPUT MODULE
1746-OA16 OUTPUT MODULE
1746-OB16 OUTPUT MODULE

Any help is appreciated.

Thanks,
Michael
 
...the other kettle will have 3 set points, 52 C for 20 minutes, 62 C for 40 minutes, 72 C for 40 minutes, and it is here I need the ramp/soak PID setup.
Do you want to ramp slowly from ambient to 52C, then ramp to 62, then ramp to 72? Or do you just want to go from ambient temperature to each set point in the shortest time possible?

Either is possible. You will have to use on/off control for your SSR relays, but you could use a "per cent time on" function to simulate a proportional output.

In your SLC 5/03 PLC program, the simple method would be to set up Step Relays to control each step of the process, and have a temperature setpoint for each step. You can use the Ramp (RMP) instruction to set time duration and begin and end output values. However, this obscures the action and may be harder for you than direct control using OTE outputs.

A more complex method is to use a Sequencer Output (SQO) instruction to step your process through the different stages.
 
Last edited:
Thank you for your quick reply.


I would start with the heating the water in kettle number one to 54C, then transfer to kettle two and add the malt which should bring the temperature down to 52C which would be the starting point for kettle two, then slowly ramp the temperature up to 62C over the next 20 min and then slowly up to 72C over the next 40 min last step for kettle two would be to ramp the temperature up to 78C over the next 40 min.
 
Michael,

Okay, so the RMP function will do that for you, or you can do the same functions using timers, relays, and outputs - your choice. EDIT: (If it were me, I would probably just make my own controls by calculating the "seconds per degree of temperature change" for each step. For example Step 2: 52 to 62 in 20 minutes = 1200 seconds/10 degrees = 120 seconds per degree. So every 120 seconds, I would add 1 to the temperature setpoint for that kettle.)

The RMP would require fewer rungs, but more logic would be hidden from you. The Ramp instruction is designed for analog outputs, but you can simulate an analog outut using a timer and your digital outputs to control your SSR relays.
RMP [Ramp] Rockwell Software

Use with processors:
These Series C processors: SLC 5/03 OS302SLC 5/04 OS401SLC 5/05 OS501

Description
The RMP instruction lets you create linear, acceleration, deceleration, and “S” curve ramp output data wave forms. Use this instruction to ramp analog outputs when using them to control devices such as valves.

The RMP control block length is 7. When programming the RMP instruction, make sure that there are at least 7 unused words following each RMP control block in the ladder program.

Operation
When the Ramp function is triggered, parameters are validated to be in range. If the parameters are valid, the ramp function places the Beginning Output Value in the Destination register.

Once the ramp function is operating, parameter changes do not have any effect on the ramp function. However, on instruction executions where the ramp remains enabled, the Position field is updated, the new Destination value is calculated, and a Done condition is checked for.

The Ramp instruction is retentive. If a Ramp instruction is executing and a power cycle occurs, the instruction continues to operate starting with the last updated Position.

Parameters
Control - an integer file address that you select. It is a 7-element file, which consists of the following flags and registers:
· Word 0 Bit 15 – Enable bit, follows rung state of ramp instruction.
· Word 0 Bit 14 – Ramping bit. When it is set, the RMP function is working.
· Word 0 Bit 13 - Done, set once the RMP function completes.
· Word 0 Bit 11 - Error, set if invalid parameters are specified.
· Word 0 Bits 0 to 7 - Ramp Algorithm Type.
If the type is 0x00, it uses Linear Algorithm with 0.01 sec timebase.
If the type is 0x01, it uses Acceleration Algorithm with 0.01 sec timebase.
If the type is 0x02, it uses Deceleration Algorithm with 0.01 sec timebase.
If the type is 0x03, uses “S” curve Algorithm with 0.01 sec timebase.
If the type is 0x10, it uses Linear Algorithm with 1 sec timebase.
If the type is 0x11, it uses Acceleration Algorithm with 1 sec timebase.
If the type is 0x12, it uses Deceleration Algorithm with 1 sec timebase.
If the type is 0x13, it uses “S” curve Algorithm with 1 sec timebase.
· Word 1 Desired Time - This word defines the time duration of the ramp, in units (1 second or 10 milliseconds). Integer value, valid range = 1 to 32767.
· Word 2 Current Time - This word is updated with the current position of ramp, in units (1 second or 10 milliseconds), each time the ramp instruction is executed. Integer value, valid range = 0 to 32767.
· Word 3 Beginning Output Value - Starting point of ramp (integer value, valid range = -32768 to 32767)
· Word 4 Ending Output Value - Ending point of ramp (integer value, valid range = -32768 to 32767)
· Long Integer 5 Time Stamp Register - Time stamp register, used by the system to control the timing of the Ramp. Because this value is a Byte the maximum scan without updating the Ramp is 1.5 seconds, this is the same as the TON and TOF instructions. This word is only for internal use.
Destination of Ramp Value Output - Ramp output (integer value)
 
Last edited:
Michael,

I think that you should only use a PID if you have an analog output module available, and if you have some type of variable heating controller such as an SCR controller.

Can your SSR relays be used to vary the output voltage based on a signal input voltage? If so, then you could buy an analog output module (a 1746-NO4V Analog 4-channel Voltage Output module would do the job) to go in your SLC 5/03 rack, and then you could use a PID block to control the temperature.
 
Last edited:
Not sure I understand the question...
Please provide samples of finished product for evaluation...:ROFLMAO:
 
Liam,
Samples are to be given only to the first one to come up with a working program! (The sample quality will be only as good as the program allows!)
 
I am new to the SLC 500 platform and am hoping that someone can give me some hints on how to do PID and ramp/soak with the SLC 500 and perhaps even some sample code for a PID controlled heating application with ramp/soak :)

It is for a small hobby project where I am trying to automate my home brewing (Beer) setup. I have 3 kettles with heating elements controlled by standard SSR relays (4-32 vdc) and the temperature is measured with PT100 sensors.

One of the kettles will have two fixed set points, 54 C and 78 C, depending on where in the brewing process I am, the other kettle will have 3 set points, 52 C for 20 minutes, 62 C for 40 minutes, 72 C for 40 minutes, and it is here I need the ramp/soak PID setup. The last kettle will just be manual on/off ideally with some sort of PWMing or like to control how vigorous the boil will be.

I have the following hardware for my little project:

CPU 1747-L532 5/03 Ser E OS302 Ser C FRN 6
1746-NR4 RTD/Resistance Input Module
1746-IB16 INPUT MODULE
1746-OA16 OUTPUT MODULE
1746-OB16 OUTPUT MODULE

Any help is appreciated.

Thanks,
Michael
Hi Michael,
Lancie is very correct. All this is very lengthy algorithm. I won't ask you to change your hardware now. But for future for such kind of application you could go for Selec PLCs. The software is so brilliant that the same logic can be finished in 10 rungs. Because there is a PID block with auto tune facility. you have to just define the variables. Then it has a digital output block. AO% variable and Cycle time variable which are inbuilt in PID are to be moved to DO block and its output si your kettle. That is PID in rungs.
There is a ramp block just defne variable rest it will do it self. had you had a Selec PLC with you, I would have given sample program for this.
Also I don't see any automation part here. So PLC infact is required. You can use a PR502 and a TC533 of Selec and plug and play. Selec PLC cost is USD 100 and the cost of PR502 + TC533 is also around USD 100. You must have paid more than USD 500 for control logix.
 
Sandeep,

The SLC 500 hardware and software, except the RTD input module, was given to me because it was being replaced with some new hardware.

The idea for now is to get the temperature control going for the 2/3 kettles and later on add-on more controls like automatic transfer of wort (liquid) between the kettles, I would also at some point like to include the cooling part of the process and add a pressure sensor to be able to automatically fill the hot liquor tank with the needed water volume for the next step in the process so more or less the whole brewing process would be automated.

Today I am using one cheap PID controller from China that I move between the kettles and doing the rest manually, this is what I was hoping to get away from as it is adds extra time and work to the brewing day.

I am also planning to use Advanced HMI as a control/monitor interface to the SLC 500.

This project started because I got the hardware more or less for free and being educated as a electronic engineer I saw a potential to get to play with some hardware again :ROFLMAO: Today I work in a completely different industry.

Is the SLC 500 the wrong HW for this?
 
Yes, the SLC 5/03 is suitable for all the tasks that you listed, including the complete automation of your brewing. However, you should realize that the 5/03 is a "modular" unit (you can add modules as needed to do different tasks). Therefore the hardware you listed is a place to start, but your will need to add some analog input modules and some analog output modules to completely automate your system. You will find that it is difficult to achieve fine control of a variable process with only digital on/off outputs.
 

Similar Topics

Hi, I'm working on a system that was built and then upgraded, not engineered that I know of. It's a high pressure hot water heat exchanger, the...
Replies
2
Views
2,414
I am buidling an incinerator temperature control loop. I have the stack temperature coming in as my Process Variable and the Control Variable is...
Replies
1
Views
1,408
I have read alot of great info on this website but I have again ran into a problem. I started my PID by inserting the current tempurture into the...
Replies
6
Views
3,019
Ok heres my question: I need a PID control for heat, I need to heat the vessel to 100 C once I reach that temp I want the pressure to take over...
Replies
14
Views
5,433
Dear experts We are facing following problem. We are using AB controllogix .PID faceplate which we are providing to client has standard Auto...
Replies
4
Views
8,728
Back
Top Bottom