<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/</id><updated>2020-02-27T14:27:59.963000Z</updated><subtitle>Recent posts to PID_FIXCYCLE time</subtitle><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#0b27" rel="alternate"/><published>2020-02-27T14:27:59.963000Z</published><updated>2020-02-27T14:27:59.963000Z</updated><author><name>Pape</name><uri>https://forge.codesys.com/u/pape/</uri></author><id>https://forge.codesys.com1a6fb3fac76081b839852d629eaeaccb514012b4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Josep,&lt;br/&gt;
Thanks a lot for your help.&lt;/p&gt;
&lt;p&gt;It finally works. I had error on my input scaling. That's why your instructions didn't work the first time.&lt;br/&gt;
The lowpass filter solved the noise. I am using 4-20mA. With Ziegler Nichols I use the temp (C)&lt;br/&gt;
 or the WORD but in percent. (G=%delta temp/ %delta CV ) in manual mode.&lt;/p&gt;
&lt;p&gt;look the results attached&lt;/p&gt;
&lt;p&gt;thanks again&lt;br/&gt;
Pape&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: with CTRL_PID.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2685"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#fa06" rel="alternate"/><published>2020-02-27T14:27:59.525000Z</published><updated>2020-02-27T14:27:59.525000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com74d5bfa82438736008aa5ee91431796cea7e2af3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;First of all. I d try to work with SI units. For example: anOut at 12000 means 100V over the resistance. Working in PID with V and °C independices your system from the converters used.&lt;/p&gt;
&lt;p&gt;Sup is not a filter is a dead band and only works when the error is nearest to 0. Previous at PID use a LowPass filter in feedback. As your system response is slow A cut frequency of 10Hz would have to work. If your feedback has noise after this filter you have somethibg wrong reading temperature.&lt;/p&gt;
&lt;p&gt;I would work with ft_pid. It has anti wind up in integral.&lt;/p&gt;
&lt;p&gt;One more question: When you calculate G for Ziegler Nichols you have used temperature(in digital counts)/Volts or Amps (in digital counts)?.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#1a8a" rel="alternate"/><published>2020-02-27T14:27:59.086000Z</published><updated>2020-02-27T14:27:59.086000Z</updated><author><name>Pape</name><uri>https://forge.codesys.com/u/pape/</uri></author><id>https://forge.codesys.come4dde95fd346cb6fba3ca9a37edd5b43324f40c9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Josep,&lt;br/&gt;
I tried your instructions and this is what I have got:&lt;/p&gt;
&lt;p&gt;I used CTRL_PID from OSCAT.&lt;/p&gt;
&lt;p&gt;My output card varies from 0 to 65534 (16bit).&lt;br/&gt;
On CTRL_PID I set LL=0, LH=100 and use LIN_TRAFO to scale it.&lt;/p&gt;
&lt;p&gt;Results: &lt;br/&gt;
I have noise all time from temp sensor that make the output fluctuating. I used SUP=0.5 but not big change. &lt;br/&gt;
I also put LH=10000, the noise is reduced a lot but controller output is very slow in this case.&lt;/p&gt;
&lt;p&gt;Do you have an idea what I am doing wrong?&lt;/p&gt;
&lt;p&gt;thanks,&lt;br/&gt;
Pape&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#7e31" rel="alternate"/><published>2020-02-27T14:27:57.809000Z</published><updated>2020-02-27T14:27:57.809000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com459e9dbf13ba65a434cdea52fe31a7efb8e73e51</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;See:&lt;/p&gt;
&lt;p&gt;Units of G. (Kp will have G units inverted)&lt;/p&gt;
&lt;p&gt;As I could see from the pid it will be: kp(1+1/Tn). Tn seems correct.&lt;/p&gt;
&lt;p&gt;This Pid seems that cant limit inyegral term. (Oscat library has pid in which you could limit integral term).&lt;/p&gt;
&lt;p&gt;You could do:&lt;/p&gt;
&lt;p&gt;Put Tn at high value  (1000000 s). It will disable inyegral term.&lt;/p&gt;
&lt;p&gt;Increase kp since you see overshoot.&lt;/p&gt;
&lt;p&gt;After that reduce tn since the system atach the desired temperature.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#63a1" rel="alternate"/><published>2020-02-27T14:27:57.368000Z</published><updated>2020-02-27T14:27:57.368000Z</updated><author><name>Pape</name><uri>https://forge.codesys.com/u/pape/</uri></author><id>https://forge.codesys.comd2d9901e7f3619d7d861304a89cee0127d85f95f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Josep,&lt;br/&gt;
This is calcs I did:&lt;br/&gt;
Kp = (0,9 * ζ) / (td *G)&lt;br/&gt;
Tn = 3,33 * td&lt;/p&gt;
&lt;p&gt;where &lt;br/&gt;
Kp: P coef.&lt;br/&gt;
ζ: time constant in sec. at (63.2%)&lt;br/&gt;
td: time delay in sec. at (2%)&lt;br/&gt;
G: process gain&lt;br/&gt;
Tn: integral time in sec.&lt;/p&gt;
&lt;p&gt;Should I manipulate Tn to adapt codesys PID formula?&lt;/p&gt;
&lt;p&gt;thanks,&lt;br/&gt;
Pape&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#c829" rel="alternate"/><published>2020-02-27T14:27:56.927000Z</published><updated>2020-02-27T14:27:56.927000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com4d33e33a0bed671ac2e0ae550921ba173e0d7422</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I dont have experience in temperature regulation, but changing task interval wont solve your problem (at least meantime the magnitud order of your system time constant be bigger than task interval).&lt;/p&gt;
&lt;p&gt;If you have overshoot cold be an integral or proportional problem. If it reacts slow and has overshootint seems small kp and big ki.&lt;/p&gt;
&lt;p&gt;Try to limit integral response.&lt;/p&gt;
&lt;p&gt;Pid has as input ki or Ti?&lt;/p&gt;
&lt;p&gt;Ki is multiplied by Kp inside pid?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#1047" rel="alternate"/><published>2020-02-27T14:27:55.649000Z</published><updated>2020-02-27T14:27:55.649000Z</updated><author><name>Pape</name><uri>https://forge.codesys.com/u/pape/</uri></author><id>https://forge.codesys.com0796abefeace637ffbb0c350d84cb69008e9928f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks Josep again,&lt;/p&gt;
&lt;p&gt;Due to I also have digital inputs, I keep this task (at 4000us) for them and put a new one only dedicated to temperature regulation at (100ms) but the output of the PID was very slow. I use ziegler &amp;amp; Nichols method to have Kp, Tn and Tv=0.  I tried to increase this cycle time but facing overshooting. How to solve that? Can someone have a look using teamviewer to help? &lt;/p&gt;
&lt;p&gt;thanks&lt;br/&gt;
Pape&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#4fae" rel="alternate"/><published>2020-02-27T14:27:55.212000Z</published><updated>2020-02-27T14:27:55.212000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.comd88b95ae5fe52f7487a855bfd28d52798aa5c639</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;It is not named cycle task. Is named task interval. In your case 4000us&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#a66c" rel="alternate"/><published>2020-02-27T14:27:54.771000Z</published><updated>2020-02-27T14:27:54.771000Z</updated><author><name>Pape</name><uri>https://forge.codesys.com/u/pape/</uri></author><id>https://forge.codesys.com5a1acec012f049ccfb63bf1ed24eca36bdcf7686</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks Josep for your help. &lt;br/&gt;
I am regulating temperature which is slow.&lt;br/&gt;
My task (Regulation) is part of Main task (see p1). &lt;br/&gt;
Is the average cycle time as shown on Task configuration - Monitor (see p2) that I have to put for the PID_fixcycle?&lt;/p&gt;
&lt;p&gt;Thanks again&lt;br/&gt;
Pape&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: p2.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2677"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: p1.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2676"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID_FIXCYCLE time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3aa1b8665f/?limit=25#4a91" rel="alternate"/><published>2020-02-27T14:27:53.502000Z</published><updated>2020-02-27T14:27:53.502000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com4f56546f6ef0f05a2cbbd47ec6ce3d17b2dda064</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You have to insert the cycle time of the task from which you are calling pid_fixcycle instance.&lt;/p&gt;
&lt;p&gt;You can go to task manager and see which is the task cycle and insert it as a constant.&lt;/p&gt;
&lt;p&gt;Or you can ask at the actual task via Iectaskmanager library ( the library name could not be absolutelly correct)&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>