News:

  • July 02, 2026, 10:24:47 AM

Login with username, password and session length

Author Topic: Do-more Plc Using pid for electric ovens  (Read 16900 times)

roytownsend

  • Jr. Member
  • **
  • Posts: 15
Do-more Plc Using pid for electric ovens
« on: June 28, 2015, 05:23:44 PM »
I am having trouble with time prop inputs and outputs. I need to use discrete outputs. Can somebody steer me in the right direction?
Thank you

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Do-more Plc Using pid for electric ovens
« Reply #1 on: June 28, 2015, 06:22:04 PM »
TIMEPROP essentially works like an A/C dimmer. It approximates an analog output by turning a discrete output on for some percentage of a time period.

The time period is given by the Cycle Time, and is expressed in milliseconds. You will need to choose that based on the expected response time of your process and the response time of your discrete output. Mechanical relays won't like it fast, but solid state could be switched fairly quickly. The key is for the time to be shorter than the response time of the process.

The next part is the control percentage. You define a 0% value that results in the output staying off, and a 100% value that results in the input staying on, and then the Continuous Input would be expected to swing between those two values. If you were using this with PID, you would likely plug the PID struct's .Output member into Continuous Input, 0.0 into 0%, and 100.0 into 100%.

The discrete output is the Y I/O point that drives your heating element.

Given these base values:
1. Cycle Time = 10000 (10 seconds)
2. 0% Min Range: = 0.0
3. 100% Max Range = 100.0

For a Continuous Input value of...
...0, the output will never turn on.
...10, the output will turn on for 1 second, and off for 9 seconds.
...25, the output will turn on for 2.5 seconds, and off for 7.5 seconds.
...50, the output will turn on for 5 seconds, and off for 5 seconds.
...75, the output will turn on for 7.5 seconds, and off for 2.5 seconds.
...90, the output will turn on for 9 seconds, and off for 1 second.
...100, the output will stay on constantly.

The simulator is a great tool for playing with instructions like this.
"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

roytownsend

  • Jr. Member
  • **
  • Posts: 15
Re: Do-more Plc Using pid for electric ovens
« Reply #2 on: June 29, 2015, 11:11:42 AM »
Hi Bob

The program that I am using is copied below. When I am trying to change to discrete output Y0, I am not seeing Y0 changing. I think I am doing something wrong and don't know where it is. Can you look this over and steer me in the right direction.

Thank You


STR X0
OUT C50

STR C50
PID OVEN3 0x75 WX0 0 4095 0.0 650 """degF""" 0 4095 WY0
SCALE WX0 5 4095 10.0 90.0 OVEN3.SP

STR X1
AND X0
MATH WX0 "10"
TIMEPROP 1000 OVEN3.Output 50 90.0 Y0

STR C50
PIDINIT OVEN3 129 5.431167 5.5353 0.92255

STR C0
ALHILO WX2 RS_0.StepTarget C1 350 C2 150 C3 50 C4

STR C50
STR X2
STR X3
RAMPSOAK RS_0 D0 1 "4 1 50 0 0 2 0 180000 0 4 150 180000 0 2 0 180000 0 4 200 180000 0 2 0 180000 0 4 300 180000 0 2 0 180000 0 4 350 180000 0 2 0 300000 0"

STR ST1
AND X0
OUT Y0

STRLE WX2 1520
OUT Y18


#BEGIN MEM_CONFIG
 RS_0 RAMPSOAK  0
 OVEN3 PID  0
#END

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Do-more Plc Using pid for electric ovens
« Reply #3 on: June 29, 2015, 11:16:58 AM »
Y0 is being used as an output in two places.
"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

roytownsend

  • Jr. Member
  • **
  • Posts: 15
Re: Do-more Plc Using pid for electric ovens
« Reply #4 on: June 29, 2015, 11:22:00 AM »
Should Y0 in the Math be something else, and what would you use? I am new to DO-MORE and PIDS.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Do-more Plc Using pid for electric ovens
« Reply #5 on: June 29, 2015, 11:26:35 AM »
In general, an output should only be used once. In the case, Y0 should only be used as an output by the TIMEPROP instruction.
"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

roytownsend

  • Jr. Member
  • **
  • Posts: 15
Re: Do-more Plc Using pid for electric ovens
« Reply #6 on: June 29, 2015, 11:34:53 AM »
The how do I power my elements. Does the Y0 in the Math control the element from there?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Do-more Plc Using pid for electric ovens
« Reply #7 on: June 29, 2015, 11:37:39 AM »
The how do I power my elements. Does the Y0 in the Math control the element from there?

I don't see a Y0 in the MATH instruction. The TIMEPROP will power it's output if enabled.
"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

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Re: Do-more Plc Using pid for electric ovens
« Reply #8 on: June 29, 2015, 11:43:00 AM »
How about in stages where the stages are never on simultaneously? I have a 32 step process where some valves open and stay open through 3 or 4 stages, then open and close in subsequent stages and so on. It is a cleaning process, filling, circulating, flushing, draining, refilling with a different chemical, etc. Every stage is the only one on at any time. However Do-More puts up lots of warnings about reuse for this process.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Do-more Plc Using pid for electric ovens
« Reply #9 on: June 29, 2015, 11:46:02 AM »
How about in stages where the stages are never on simultaneously? I have a 32 step process where some valves open and stay open through 3 or 4 stages, then open and close in subsequent stages and so on. It is a cleaning process, filling, circulating, flushing, draining, refilling with a different chemical, etc. Every stage is the only one on at any time. However Do-More puts up lots of warnings about reuse for this process.

Perfectly fine. And since we know there are exceptions to that rule, we are adding a very nice facility to 1.4 for acknowledging those warnings.
« Last Edit: June 29, 2015, 11:48:54 AM by BobO »
"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

roytownsend

  • Jr. Member
  • **
  • Posts: 15
Re: Do-more Plc Using pid for electric ovens
« Reply #10 on: June 29, 2015, 12:01:50 PM »
OOPs TimeProp. I saw that I had WY0 in the Input (in the TimeProp) so I changed that to WX0 and Y0 does not seem to work.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Do-more Plc Using pid for electric ovens
« Reply #11 on: June 29, 2015, 02:50:33 PM »
Since the SIM's process simulator takes whatever is output to WY0 and reflects that back to WX0 with the process simulator applied, using the output of TIMEPROP isn't really possible...but you can take the .Output member of your PID loop and drive a TIMEPROP to see how it behaves.

In your TIMEPROP instruction, the 1000, OVEN3.Output, and Y0 are fine. Change 0% Min Range to 0.0 and 100% Max Range to 100.0. Down on rung 7 where you have Y0 as an output...remove that. Since your TIMEPROP rung is powered through X1 and X0, they both have to be on for the TIMEPROP to operate. Might want to add the TIMEPROP to rung 2 with the loop and scale.
"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

roytownsend

  • Jr. Member
  • **
  • Posts: 15
Re: Do-more Plc Using pid for electric ovens
« Reply #12 on: June 29, 2015, 02:56:02 PM »
Hi Bob

Well I think that I have it working now.
I started all over and wrote a new program.
Thank you for all of your help.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Do-more Plc Using pid for electric ovens
« Reply #13 on: June 29, 2015, 02:58:23 PM »
Hi Bob

Well I think that I have it working now.
I started all over and wrote a new program.
Thank you for all of your help.


Sometimes that is best. Glad it's working now.
"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