Announcement

Collapse
No announcement yet.

Auto Tune PID With Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • Auto Tune PID With Code

    Again, I have another project I would like to use the P series PLC but I need to be able to auto tune the PIDs using code. Please think about adding this to the P series. The Click now has this feature.

    Brad


  • #2
    There is an auto tune feature built in if you right click the PID and go to 'PID Tuning', unless you are referring to online tuning.

    Comment



    • #3
      Towlie, I need to be able to have each zone auto tune without using a computer. I have 8-12 zone heater cabinets used to control extrude heaters. The cabinets are portable. The heaters the cabinets control are not always the same heater everyday. I need to write into code so the operator could push a button and that heater zone would autotune. I can't give the operators a computer! If AD can fit code control autotune into the Click memory they can surly fit it into the P series memory.

      Comment



      • #4
        There is ways to do this if you write it. Been a while but you can basically re-create what they have setup. You would run a loop to certain set-points for x time, grab the values and then you can get PI from that. I think you want the Ziegler-Nichols’ Tuning method.

        Comment



        • #5
          Originally posted by bsinkovich View Post
          Towlie, I need to be able to have each zone auto tune without using a computer. I have 8-12 zone heater cabinets used to control extrude heaters. The cabinets are portable. The heaters the cabinets control are not always the same heater everyday. I need to write into code so the operator could push a button and that heater zone would autotune. I can't give the operators a computer! If AD can fit code control autotune into the Click memory they can surly fit it into the P series memory.
          I'm sure the code is there, it's just an issue of if and how you expose the auto-tuning to the PLC code. Do-more/BRX auto-tuning can be executed and managed from PLC code, but I don't know of anyone doing it, so it seems like there isn't a big demand for it.

          Comment



          • #6
            Originally posted by BobO View Post
            Do-more/BRX auto-tuning can be executed and managed from PLC code
            I didn't know this!!
            How does one execute this?
            Is there a bit that needs to be set or enabled?

            Comment



            • #7
              Originally posted by pbw View Post

              I didn't know this!!
              How does one execute this?
              Is there a bit that needs to be set or enabled?
              Uh oh...now I did it. It's possible that not everything is available, but most is and it should work.

              PID structure fields:
              .Tune - Starts the tuning
              .AutoTuning - Signals that tuning is actually running
              .AutoTuneComp - Signals when tuning is complete
              .AutoTuneErr - Signals that it failed
              .TunedParms - false = PI, true = PID
              .TuningAlg - false = closed loop, true = open loop

              A few caveats:
              The tuning deadband parameter from closed loop, as well as sample time, min PV change, and output bump are apparently not public fields. They are in the PID structure however, and you could probably copy the struct into byte memory and set the relevant locations and copy back. It's a hack though.

              We started down the road for this to be something users could do, and then I think it never got documented, and strictly speaking, was never really completed. DmD is just manipulating the structure to tune though, and of course the structure can be manipulated by code just as easily.

              Comment



              • #8
                Thanks.
                I will definitely give this a try.

                Comment

                Working...
                X