News:

  • September 24, 2026, 04:24:12 AM

Login with username, password and session length

Author Topic: PID .Tune Bit Problem  (Read 9173 times)

Mike Nash

  • Hero Member
  • *****
  • Posts: 655
PID .Tune Bit Problem
« on: April 13, 2020, 05:20:18 PM »
So I'm playing around in the simulator with the PID again (same project) and tried initiating an auto tune from ladder. .TuningAlg off and .TunedParams off. Toggle .Tune on from data view and tuning started on MyPID in the Process Sim. It tunes as it should, but that business in the help about .Tune being an edge trigger doesn't hold up. It fails to let go afterwards, the output stays at zero, the Bias starts heading for well below -100% (at -515% and still going when I snapped it) and the PV of course, heads south also. If I use .Tune AND .AutoTuneComp RST .Tune everything is mostly good. That does break the Auto Tune in PID View however. It tunes but never completes the dialog.

Finally, any successful auto tune sets the bias to zero afterwards which really slows the recovery for PV to SP since the output was already low, PV too and now bias has to have time to recover.

First image, the rung to turn off MyPID.Tune is not in the PLC. You can see in the trend where the auto tune is done when the PV crosses the SP the last time and bias gets set to zero and then drops further.

Second image is with the RST active, but bias goes to zero.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: PID .Tune Bit Problem
« Reply #1 on: April 13, 2020, 05:34:28 PM »
So I'm playing around in the simulator with the PID again (same project) and tried initiating an auto tune from ladder. .TuningAlg off and .TunedParams off. Toggle .Tune on from data view and tuning started on MyPID in the Process Sim. It tunes as it should, but that business in the help about .Tune being an edge trigger doesn't hold up. It fails to let go afterwards, the output stays at zero, the Bias starts heading for well below -100% (at -515% and still going when I snapped it) and the PV of course, heads south also. If I use .Tune AND .AutoTuneComp RST .Tune everything is mostly good. That does break the Auto Tune in PID View however. It tunes but never completes the dialog.

Finally, any successful auto tune sets the bias to zero afterwards which really slows the recovery for PV to SP since the output was already low, PV too and now bias has to have time to recover.

First image, the rung to turn off MyPID.Tune is not in the PLC. You can see in the trend where the auto tune is done when the PV crosses the SP the last time and bias gets set to zero and then drops further.

Second image is with the RST active, but bias goes to zero.

That technically should work, but was never tested, and is unsupported.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Mike Nash

  • Hero Member
  • *****
  • Posts: 655
Re: PID .Tune Bit Problem
« Reply #2 on: April 13, 2020, 05:48:14 PM »
That technically should work, but was never tested, and is unsupported.

Hmm, somebody must think it is/was/does, whichever. It's explained pretty well in the instruction help when I click on the "?".

Now in the PID Loops section, it is there, but sketchier.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: PID .Tune Bit Problem
« Reply #3 on: April 13, 2020, 06:34:56 PM »
I didn't realize any was ever documented. It should work fine. The big issue is that a couple of the things being set by DmD's tune dialog aren't publicly accessible in the structure. It could be accessed indirectly by copying in and out of other memory, but that isn't exactly user friendly.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Mike Nash

  • Hero Member
  • *****
  • Posts: 655
Re: PID .Tune Bit Problem
« Reply #4 on: April 13, 2020, 07:00:47 PM »
This statement also doesn't appear to be true:

These three status Bits will retain their last value until the .Tune Bit is turned OFF then ON, which would initiate another Autotune attempt.

I don't see any being retained when .Tune is off, even when only running it from the dialog.

I never saw it error on PV not changing in closed loop either. I don't know what the timeout would be, but I waited at least several minutes.

Regardless, if I use a Bit "mybit" to SET .Tune and interlock to RST .Tune (and mybit) only if mybit is true, then that doesn't
break anything.

STR MyPID.Tune
AND MyPID.AutoTuneComp
AND C10 "mybit"
RST MyPID.Tune
RST C10 "mybit"

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: PID .Tune Bit Problem
« Reply #5 on: April 13, 2020, 09:48:01 PM »
Again, this wasn't vetted. It was my original intent that the tuning be possible from the program, but that was never completed.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO