<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to how to determine the cycle time of a POU?</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/d10401c536/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/d10401c536/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/d10401c536/</id><updated>2020-02-27T22:29:20.494000Z</updated><subtitle>Recent posts to how to determine the cycle time of a POU?</subtitle><entry><title>how to determine the cycle time of a POU?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/d10401c536/?limit=25#ab07" rel="alternate"/><published>2020-02-27T22:29:20.494000Z</published><updated>2020-02-27T22:29:20.494000Z</updated><author><name>Rolf-Geisler</name><uri>https://forge.codesys.com/u/rolf-geisler/</uri></author><id>https://forge.codesys.comeae0fd2bb1c9a81af6f179e4b3865e7079c3138a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;the little exampe I gave shows how to find the execution time of a POU (i.ethe time between starting it's execution and it's end).&lt;/p&gt;
&lt;p&gt;The "task cycle" is the time between two consecutive calls of a POU. Sometimes it is useful to know it, particularly in multitasking applications. The way to calculate is similar to the POU execution time:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;ExecutionTime&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;TaskCycle&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;span class="nt"&gt;TaskCycle&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;EntryTimeStmp&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;(*&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;contents&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;your&lt;/span&gt; &lt;span class="nt"&gt;POU&lt;/span&gt; &lt;span class="nt"&gt;here&lt;/span&gt; &lt;span class="o"&gt;*)&lt;/span&gt;
&lt;span class="nt"&gt;ExecutionTime&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Hope this makes it clear.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>how to determine the cycle time of a POU?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/d10401c536/?limit=25#17fd" rel="alternate"/><published>2020-02-27T22:29:18.934000Z</published><updated>2020-02-27T22:29:18.934000Z</updated><author><name>hcchin</name><uri>https://forge.codesys.com/u/hcchin/</uri></author><id>https://forge.codesys.com71a5e0facd1ea988caa86d79e2a2486af7d94baf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Rolf_Geisler hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Function TIME() returns the CPU time stamp. Call it on POU entry, store the result in a local variable, then call it before exiting the POU again. The difference to first call ist the execution time of this POU:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;ExecutionTime&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;(*&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;contents&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;your&lt;/span&gt; &lt;span class="nt"&gt;POU&lt;/span&gt; &lt;span class="nt"&gt;here&lt;/span&gt; &lt;span class="o"&gt;*)&lt;/span&gt;
&lt;span class="nt"&gt;ExecutionTime&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In the same way you can check the task cycle.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: blue;"&gt;&lt;strong&gt;Thank you for your valuable information. by the way what do you mean the task cycle? Do you mean I can check the task cycle of that particular POU in the codesys software?&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>how to determine the cycle time of a POU?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/d10401c536/?limit=25#1f12" rel="alternate"/><published>2020-02-27T22:29:14.628000Z</published><updated>2020-02-27T22:29:14.628000Z</updated><author><name>hcchin</name><uri>https://forge.codesys.com/u/hcchin/</uri></author><id>https://forge.codesys.comda57b7cb7aabacc6dd529939eb9b38b11c8dec9c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you for your valuable information. by the way what do you mean the task cycle? Do you mean I can check the task cycle of that particular POU in the codesys software?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>how to determine the cycle time of a POU?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/d10401c536/?limit=25#9f39" rel="alternate"/><published>2020-02-27T22:29:13.064000Z</published><updated>2020-02-27T22:29:13.064000Z</updated><author><name>Rolf-Geisler</name><uri>https://forge.codesys.com/u/rolf-geisler/</uri></author><id>https://forge.codesys.com26d56989fb0074d52be3e38bc80a7c73fd6e3fe0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Function TIME() returns the CPU time stamp. Call it on POU entry, store the result in a local variable, then call it before exiting the POU again. The difference to first call ist the execution time of this POU:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nt"&gt;ExecutionTime&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;(*&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;contents&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;your&lt;/span&gt; &lt;span class="nt"&gt;POU&lt;/span&gt; &lt;span class="nt"&gt;here&lt;/span&gt; &lt;span class="o"&gt;*)&lt;/span&gt;
&lt;span class="nt"&gt;ExecutionTime&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;TIME&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;EntryTmStmp&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In the same way you can check the task cycle.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>how to determine the cycle time of a POU?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/d10401c536/?limit=25#693a" rel="alternate"/><published>2020-02-27T22:29:08.746000Z</published><updated>2020-02-27T22:29:08.746000Z</updated><author><name>hcchin</name><uri>https://forge.codesys.com/u/hcchin/</uri></author><id>https://forge.codesys.com65998d14f2416b14761c4fbf5aa57396d0f9517c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;if there is a POU(PLC_PRG) is running on a controller, how to determine the cycle time of a POU? Some of the controllers has returned in the datasheet that about 1000 statement in 3ms. but i just want to know how much time has been taken for a cycle time in a POU?  Please advise.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>