News:

  • April 30, 2026, 08:17:40 PM

Login with username, password and session length

Author Topic: PID help  (Read 28401 times)

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
PID help
« on: October 02, 2018, 07:54:53 PM »
I read all the material and can not figure out how to control a output bit. I am using a Watlow Temperature controller and figured I should be able to do the same thing in the D0-More. The watlow controls an discreet output in turn turns my SSR on and off until it the ovcen reaches temperature. I just can not see how the PID in the Do-More controls an output. there is no box to fill out for an output. Somewhere there must be a clear example of having a thermocouple connected to WX0 and the PID controls a bit output. This is such a common thing to do. They talk about a hot air balloon but that is not what I want to do. lol For years I avoided using the PID in plcs and just go with a Watlow controller. Easy pizy.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: PID help
« Reply #1 on: October 03, 2018, 05:04:37 AM »
The output of the PID instruction is the .Output field of the PID structure. It will be a value from 0 to 100. If you want to drive a discrete output, use a TIMEPROP instruction. The .Output field will be your input and the discrete will be your output.
"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

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: PID help
« Reply #2 on: October 03, 2018, 12:14:20 PM »
Thank you. I was going to use the TIMEPROP by itself, but now I see how they work together.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: PID help
« Reply #3 on: October 03, 2018, 03:36:06 PM »
Why, when I was young, we didn't have TIMEPROP -- we had a tiny little man with an even tinier knife switch and stop watch.  The PID would have to Telex him the new CV.  Every two hours when he went on break we'd get a process upset.  ;)
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: PID help
« Reply #4 on: October 03, 2018, 04:34:10 PM »
Why, when I was young, we didn't have TIMEPROP -- we had a tiny little man with an even tinier knife switch and stop watch.  The PID would have to Telex him the new CV.  Every two hours when he went on break we'd get a process upset.  ;)

Back when we used 'O' for Zeros and sharpened twigs for Ones. Hard times.
"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

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: PID help
« Reply #5 on: October 03, 2018, 04:41:05 PM »
Why, when I was young, we didn't have TIMEPROP -- we had a tiny little man with an even tinier knife switch and stop watch.  The PID would have to Telex him the new CV.  Every two hours when he went on break we'd get a process upset.  ;)

Back when we used 'O' for Zeros and sharpened twigs for Ones. Hard times.

Luxury!  When I was a young instrumentation tech we had a rock on a rope for a level control.  When the rock got wet, Johnny would scramble down the ladder and open the valve till he heard it gurgling.  Then back up the ladder he went.  Those were the days...

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: PID help
« Reply #6 on: October 03, 2018, 07:00:31 PM »
Back in the day, before v2, all we had to drink was hydroxyl!  Not NEARLY as refreshing as water.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Re: PID help
« Reply #7 on: October 03, 2018, 07:59:34 PM »
PLCguy,
If you try autotune you will likely pee yourself with excitement! Tuning a pump for controlling flow, a few seconds at most. Tuning a blower to hold a constant pressure a few seconds. Tuning a pump to hold a tank level, a minute or two. Tuning a pH control loop on a complete system of tanks, about 45 minutes. Haven?t had the need to tweak anything.

Freaking AWESOME!!!

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: PID help
« Reply #8 on: October 04, 2018, 12:16:13 PM »
Okay, I will stop by RiteAid to get  a box of Depends before I try the autotune.

Just briefly reading through all the info, but looks like I still use PID with TimePromp to give me the discrete output I need. The setup is a heater with a thermocouple. Actually 8 of them in different zones. I will get one to work then the others are a copy. I need to reach a temp of 350 degrees F. That is my goal.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: PID help
« Reply #9 on: October 04, 2018, 12:26:40 PM »
TIMEPROP is just a slow PWM that uses a 0-100 input to drive what amounts to a dimmer. As long as whatever drives your heater is solid state, you can switch the heater relatively quickly and get a much better control of your temperature. One Hostie built a powder coat oven doing exactly this and was able to control his temp to within a few degrees. If you are driving a relay, you can still use TIMEPROP, but you will need to choose a much longer cycle time to keep from killing your relay as fast. I wouldn't use a relay though.

I don't know what your existing temp controller uses, but it's converting the analog output from the PID loop into a discrete output in some similar manner, it's just built into the controller.
"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

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: PID help
« Reply #10 on: October 05, 2018, 12:13:50 PM »
Yes, the heaters are being turned off/on with a SSR. So if I understand you. I will being using a PID than use that output to the TimeProp controlling my SSR?
 
The watlow controllers  have an autotune feature also which in turn the controller operates my SSR. Interesting to watch. The SSR stays on for long periods and as the set point is getting closer, the SSR slowly turns on and off until it reaches the setpoint.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: PID help
« Reply #11 on: October 05, 2018, 12:37:49 PM »
You understand correctly.

The TIMPROP's interval will control what you see. Since you are driving with 60Hz, I wouldn't go less than 1 second, but if you do go short, it'll be blinking, and not so much on or off. For temperature control you could go longer with good results, but short makes the control much more analog.
"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

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: PID help
« Reply #12 on: October 20, 2018, 07:47:50 AM »
I will be doing some reading today. Printed out the PID View and Auto-Tune topics. Auto-Turn did not go so well.
Not understanding why my PV value was so off in the PID view. The memory I am looking is the thermocouple which reads 72. But when I bring up the PID view PV = 55. I have no idea what numbers I am suppose to start with in the gain, etc boxes. I set the SP to 175 thinking that is the temp I want to reach. Running the Auto-tune it went way over 175 according to monitoring the thermocouple. The graph showed it was no where reaching the 175. So I am thinking the numbers are not actually real world numbers? All the boxes stayed greyed out so I cancelled the auto tune. Printed out all the info and see what I come up with. I guess this is one of those things that is not obvious.

Garyhlucus, if you read this what numbers did you start with? My setup is, N0 contains the thermocouple reading. It was reading 72 degrees. PV in the PID view shows 55. I wanted to tune the heater to reach 175 degrees. But that never happened. The graph showed very slow  progress and 175 was way up the scale, but my thermocouple was reading 250 so I canceled.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: PID help
« Reply #13 on: October 20, 2018, 08:48:03 AM »
For your initial condition, you want the SP to be above the PV, and at roughly mid range. Auto tune will drive the output to 100% until the PV crosses above SP, then it will go to 0% until it drops back below. It will do that two more times, for a total of three cycles. Then it will compute the loop parameters and set them. If you are doing temp control and have a slow moving process that can take a while.

On Host's website there is a page of FAQs. One of those describes in detail how to use the simulator to demonstrate auto tuning. It's very quick and will show you exactly what you should be seeing. Can't get the link now, but I'll try to a bit later.
"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: 652
Re: PID help
« Reply #14 on: October 20, 2018, 10:13:17 AM »
As much as I wanted to use real-world values for SP, PV, etc., there are a few factors that make that less than ideal in the PID. The PID was built with 0-100% being more the range it wants to work with. Scale your real-world values to this range and the PID works so much more betterer.

You CAN use your real-world values instead, but some things will work less than ideally, especially with Autotune. The P, I and D terms have had a limit on decimal places when reading and writing these values from the interface buttons. This may have changed since I reported it, I just don't recall. (It does look like there are more decimal places now, cool.)

See https://forum.hosteng.com/index.php/topic,1787.msg15129.html#msg15129 on the resolution change.