Showing results for 
Search instead for 
Did you mean: 

How to control temerature rise - limit to 50 degree's per minute

Go to solution

I have a program using "PID Autotuning (Temperature).vi" and I need to also control the heating/cooling slope to 50 degree's per minute to prevent damage to the heater.  The attached program keeps my temperature on target +/- 5 degrees (may work on getting it more accurate) with the current temperature slope close to 100 degree's per minute until is starts to round off to the proper temp.


I am using a USB-6218 with analog out to control my heater voltage and analog inputs for my temperature monitoring as well as voltage and current measurements.


I could just increase my temp to be 25-75 degree's above my current temp until the set point is reached but I was hoping for a cleaner way of doing this.


Thanks for any help.



0 Kudos
Message 1 of 6

Hi Bill,


either change your temperature setpoint using a ramp according to your requirements - or setup the PID to control the temperature change instead of the absolute temperature value...

Best regards,

using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 2 of 6
Accepted by NutmegTheDog

Hi Bill,


There is a vi called "PID Output Rate Limiter" that provides this functionality.

As the name implies, it will limit the output change of a PID.

For a recent project, I used this vi to limit the rate of change of the SP setting.

(In my case, it was more convenient to work in the units of the SP rather than the output.)


My SP limiter is attached. "output rate (EGU/min)" is set by a constant in the case structure.



P.S. If you drag down on the Index Array function you "automagically" get sequential

indexes (i.e. 0,1,2 ...) so you don't need to add 3 constants or 2 extra Index Array blocks.

Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
Message 3 of 6

Thank you for all the input, the PID Output Rate Limiter worked exactly as needed, I was able to put it before my PID Autotuning (Temperature).vi and I can keep a 50 degree/minute increase/decrease with very good accuracy.  



One problem, I activated my autotuning and the heater voltage peaked to the max value completely ignoring the ramp rate.  Is this typical for autotune?  I don't know if I can ignore my ramp rate at any time as the heaters are very expensive.



0 Kudos
Message 4 of 6

Hi Dog,


why do you use the Autotunign at all? Why not use the AdvancedPID (without Autotune)?


On your VI:

- you can resize the IndexArray function to provide 3 outputs, and you can omit the index constants at its inputs for sequential elements…

- On Windows you don't want to use a TimedWhileLoop…

- Do you really want to read data with a sample rate of 1kS/s? Then use DAQmxTimings to set a samplerate!

- How fast do you want to read thermocouples? Which hardware do you use?

Best regards,

using LV2016/2019/2020 on Win8.1/10+cRIO
Message 5 of 6



I want to use autotune because;

   1.   I will get a more steady analog voltage output for my heaters.

   2.   I would like to have a linear rise and fall as well as steady state for the temperature. 

   3.   This heater will be in an environment that can not have a pulsing voltage due too noise concerns.  Without proper tuning, I've seen the voltage change from 0V to 10V with current changes up to 5A.  Currently the heat is controlled by a physical dial so the voltage is very steady once at temp.

   4.   Also when this will be used, various items of different sizes/shapes will be placed on the heater and the customer may want to autotune the heater for the most steady heating capability.



-   Took out the Timed loop, I just figured I could use that rather then the wait state.  I've never used it before.


-   Currently I am making a measurement once a second but with the higher resolution on the thermocouple, I might make it every 0.5 or 0.25 seconds, will test it out in the future.  Previous work has a 12-bit thermocouple without a PID and it had horrible response, this is so much better.


-   I am using a USB-6218 (OEM) for proof of concept, I will have a motor to control in the future for the other analog out and a few more analog inputs but the board may change.


Thanks for the insight and help!



0 Kudos
Message 6 of 6