No announcement yet.

On/Off Temperature controls

  • Filter
  • Time
  • Show
Clear All
new posts

  • On/Off Temperature controls

    I need help trying to program from p1000 to c-more HMI. I am wanting on/off temperature controls. Basically so the operator can punch in a number/setpoint on HMI then the PLC can open a valve for either cooling or heat. Once the temperature is reached goes off until +- 5 degrees then repeat. I am very new to programming just finished a programming course but still fill very dumb on this. Any help is appreciated thank you.

  • #2
    Programming this will take some analysis of the real world functioning of the system you are trying to heat/cool. Lets say you are heating the system and reach the set point. If you turn off the heating output will the system stay at that temperature? Might it possibly continue to rise a bit? After a while will it fall far enough to need heating again? What will the system normally do? If like a house the external conditions may, at some times in the year, may rise and need intermittent cooling. In an ideal system once reaching the set point the temperature wouldn't change at all. For best learning post what you have tried and we will help.



    • #3
      You'll want to use a PID command for this. Look up help topic P167, and scroll down to the time-proportional control (there is an image of a hot air balloon). I had never done a PID before, but the P-suite (and the self tune) made it very easy to implement and use.

      Good luck!
      Why worry? If you've done the best you can, worrying won't make it any better

      - Walt Disney


      • #4
        As Bernie said, some knowledge of the actual physical system is in order. While PID is certainly a useful technique, and with time proportioning can be used with on/off outputs, there may be some systems where physical constraints make the preferred time period too long for good control and plain old fashioned on/off with hysteresis would be better suited.

        Then there is a slight chance that this is someone's homework and the assignment is for on/off, not PID

        Here is one possible technique (finding errors is left as an exercise for the student)

        process_value <= (set_point -5 )                                           Heat_output
        [comparison operator]--------------------------------------------------[SET]
        process_value  >= (set_point )                                              Heat_output
        [comparison operator]--------------------------------------------------[RESET]
        process_value => (set_point +5 )                                          Cooling_output
        [comparison operator]--------------------------------------------------[SET]
        process_value <= (set_point)                                                Cooling_output
        [comparison operator]--------------------------------------------------[RESET]
        Or, one could draw a state diagram, program it with stages and avoid SET/RESET which some people consider an abomination.
        Keep in mind that I know noting about Productivity programing, the following might be a rough representation of DoMore code
        [[ Start]]
        'assume Set_point has been given a value via HMI
        'now, since as far as I know most PLC programing does NOT allow things like IF (23*45) < (99 - 12) THEN 
        'we'll calculate the limits in separate rungs, I'm guessing simple addition and subtraction is fast enough that it is not a big deal to do it every scan
        'but of course it only needs to be done when the Set_point is changed (might try just doing it once a second or so)
        'one might also allow setting the hysteresis via the HMI and use a variable rather than the constant '5'
        [MATH] Max_temp = Set_point + 5
        [MATH] Min_temp = Set_point - 5
        [compare] Process_value <= Min_temp ------------- [SGSET SHeat] 
        'oh oh, guess I didn't avoid SET/RESET after all! , but if we JMP then changing the setpoint while heating or cooling would have to be handled some other way.
        [compare] Process_value >= Max_temp ------------ [SGSET sCool]
        [ON]--------------------------------------------------------[OUT heat_actuator]
        [compare] Process_value >= Set_point -------------[SGRST SHeat]
        [ON] ------------------------------------------------------[OUT cooling_actuator]
        [compare] Process_value <= Set_point ------------[SGRST SCool]
        Last edited by Tinker; 03-15-2019, 05:22 PM. Reason: addition


        • #5

          The above post will use PID with a relay output to control heat in a cup of water.
          Hope this helps you out.
          Click image for larger version

Name:	Productivity 1000 Series PLC PID Instruction 002-min.png
Views:	99
Size:	72.5 KB
ID:	121369
          Attached Files