<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to PID Analog controller</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/</id><updated>2020-02-27T13:47:49.246000Z</updated><subtitle>Recent posts to PID Analog controller</subtitle><entry><title>PID Analog controller</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/?limit=25#50ee" rel="alternate"/><published>2020-02-27T13:47:49.246000Z</published><updated>2020-02-27T13:47:49.246000Z</updated><author><name>alwoso</name><uri>https://forge.codesys.com/u/alwoso/</uri></author><id>https://forge.codesys.comb6ed58b5278737908f7b9d5a87ec2507decbc83a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK,&lt;/p&gt;
&lt;p&gt;the same settings are working fine in my test program (just using a ControlWin PLC).....&lt;/p&gt;
&lt;p&gt;No more ideas   &lt;/p&gt;
&lt;p&gt;Good luck&lt;/p&gt;
&lt;p&gt;Alfred&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: PID_Ctrl.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3867"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID Analog controller</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/?limit=25#5b31" rel="alternate"/><published>2020-02-27T13:47:49.196000Z</published><updated>2020-02-27T13:47:49.196000Z</updated><author><name>mechbaral</name><uri>https://forge.codesys.com/u/mechbaral/</uri></author><id>https://forge.codesys.comb8feb29d2ab3d2e5dc79f10a8f2ee2b77dfb6f85</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;alwoso hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi ermanas,&lt;br/&gt;
You did not give "KP", "TN" or "TV" values to the input parameters. But these are the necessary values for closed loop control. Try Some values there, and you will see the result &lt;br/&gt;
Just one little question: Did you define "outputafterlimit" as a REAL variable? If you have an INT, you always will see only 0 or 1 at the output......&lt;br/&gt;
Good luck!&lt;br/&gt;
Alfred&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;Thank you for your reply, I have given the value of the Kp TN and TV too actually i gave the value while defining the variable so we cannot see there. I have attached the image.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Screenshot_5.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3866"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID Analog controller</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/?limit=25#1558" rel="alternate"/><published>2020-02-27T13:47:49.145000Z</published><updated>2020-02-27T13:47:49.145000Z</updated><author><name>alwoso</name><uri>https://forge.codesys.com/u/alwoso/</uri></author><id>https://forge.codesys.combc991425e62888d8cc175882c90b0d3e75049549</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi ermanas,&lt;/p&gt;
&lt;p&gt;You did not give "KP", "TN" or "TV" values to the input parameters. But these are the necessary values for closed loop control. Try Some values there, and you will see the result &lt;/p&gt;
&lt;p&gt;Just one little question: Did you define "outputafterlimit" as a REAL variable? If you have an INT, you always will see only 0 or 1 at the output......&lt;/p&gt;
&lt;p&gt;Good luck!&lt;br/&gt;
Alfred&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID Analog controller</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/?limit=25#68f6" rel="alternate"/><published>2020-02-27T13:47:49.083000Z</published><updated>2020-02-27T13:47:49.083000Z</updated><author><name>mechbaral</name><uri>https://forge.codesys.com/u/mechbaral/</uri></author><id>https://forge.codesys.comb9d4e1eed3317b604cfcaf61d07c773a1bceb734</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;lukbok hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi guy,&lt;br/&gt;
You have to read about PID controllers but imho you should scale input from -32767..32767 to 0..32767.&lt;br/&gt;
Your analog output has less resolution then input so you can do it in this way.&lt;br/&gt;
In attachment i am sending example of using PID block.&lt;br/&gt;
Lukasz&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi I tired the setup for temperature it does not stop at setup value rather than it goes on decreasing to negative if the output after sub function is ActualTemperature so i changed the value and checked  there is no output from the PID the only thing i can see is the value is subtracted on every cycle by 0.1. &lt;br/&gt;
Can you please explain the working &lt;br/&gt;
&lt;span&gt;[img]&lt;/span&gt;&lt;span&gt;[img]&lt;/span&gt;&lt;span&gt;[/img]&lt;/span&gt;&lt;span&gt;[/img]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Screenshot_4.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3864"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID Analog controller</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/?limit=25#6476" rel="alternate"/><published>2020-02-27T13:47:49.016000Z</published><updated>2020-02-27T13:47:49.016000Z</updated><author><name>lukbok</name><uri>https://forge.codesys.com/u/lukbok/</uri></author><id>https://forge.codesys.com6f6fe83246c316f72c067ce2139da5287f8b6214</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi guy,&lt;/p&gt;
&lt;p&gt;You have to read about PID controllers but imho you should scale input from -32767..32767 to 0..32767.&lt;br/&gt;
Your analog output has less resolution then input so you can do it in this way.&lt;/p&gt;
&lt;p&gt;In attachment i am sending example of using PID block.&lt;/p&gt;
&lt;p&gt;Lukasz&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=2265" rel="nofollow"&gt;Onl.pdf &lt;span&gt;&lt;span&gt;[185.32 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PID Analog controller</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8c25973d4c/?limit=25#3512" rel="alternate"/><published>2020-02-27T13:47:48.932000Z</published><updated>2020-02-27T13:47:48.932000Z</updated><author><name>ermanas</name><uri>https://forge.codesys.com/u/ermanas/</uri></author><id>https://forge.codesys.com4ac7eec3108f37b950cc0699b5b79cdfbe716faf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all;&lt;/p&gt;
&lt;p&gt;I read the related posts on board but it seems to be there is no any subjects related to this.&lt;/p&gt;
&lt;p&gt;We are building a line follower robot using TURCK's PLC with codesys V3.5sp8.&lt;br/&gt;
I want to use PID control function block for line follower to minimize the mistakes but I couldnt understand how to commission it.&lt;/p&gt;
&lt;p&gt;I read analog value from line follower camera between -10V...0V...+10V in PLC like -32767...0...32767&lt;br/&gt;
And I send this to steering servo analog speed Input directly. (by doing some basic math)&lt;/p&gt;
&lt;p&gt;I dont know how to commission PID or PD function block on both analog input and analog output.&lt;br/&gt;
Or maybe I should use another block like Hysteresis?&lt;br/&gt;
Can anyone give me any advise about it or give me any example about commissioning PID block?&lt;/p&gt;
&lt;p&gt;Actual = "read_from_line_follower_cam"&lt;br/&gt;
SET_POINT = ???&lt;br/&gt;
KP = ???&lt;br/&gt;
TN = ???&lt;br/&gt;
Y_OFFSET = ???&lt;br/&gt;
Y_MIN = 1000&lt;br/&gt;
Y_MAX = -1000&lt;br/&gt;
MANUAL = "man_button:=BOOL"&lt;br/&gt;
RESET = "reset_button:=BOOL"&lt;/p&gt;
&lt;p&gt;Any help would be great.&lt;br/&gt;
Thanks in advance&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>