<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Controlling Timing of a Function Block</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3a480537e3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3a480537e3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3a480537e3/</id><updated>2020-02-27T22:29:59.493000Z</updated><subtitle>Recent posts to Controlling Timing of a Function Block</subtitle><entry><title>Controlling Timing of a Function Block</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3a480537e3/?limit=25#4ebf" rel="alternate"/><published>2020-02-27T22:29:59.493000Z</published><updated>2020-02-27T22:29:59.493000Z</updated><author><name>t.lundahl</name><uri>https://forge.codesys.com/u/t-lundahl/</uri></author><id>https://forge.codesys.com2ab75c2b4dcdfea59299529f846e480fe18dbca7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Software Monkey hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
 task how fast it should run&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No it means that you can tell it when it shall start. If it's a complex code it will take longer time to execute.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Controlling Timing of a Function Block</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3a480537e3/?limit=25#2b5c" rel="alternate"/><published>2020-02-27T22:29:57.930000Z</published><updated>2020-02-27T22:29:57.930000Z</updated><author><name>Software Monkey</name><uri>https://forge.codesys.com/u/software-monkey/</uri></author><id>https://forge.codesys.comda05988d72e2b7b8a10b92c7971d1c410d1c7601</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Its OK, I figured it out!&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Tony&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Controlling Timing of a Function Block</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3a480537e3/?limit=25#e1ae" rel="alternate"/><published>2020-02-27T22:29:56.380000Z</published><updated>2020-02-27T22:29:56.380000Z</updated><author><name>Software Monkey</name><uri>https://forge.codesys.com/u/software-monkey/</uri></author><id>https://forge.codesys.com758cdc1832866d279a5b34eaf126159a768afe4d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Wow thanks, so I can tell a task how fast it should run? Could I ask you how I associate my code with that task?&lt;/p&gt;
&lt;p&gt;Sorry if that is a dumb question but this is all new to me.&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;
&lt;p&gt;Tony&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Controlling Timing of a Function Block</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3a480537e3/?limit=25#6045" rel="alternate"/><published>2020-02-27T22:29:52.060000Z</published><updated>2020-02-27T22:29:52.060000Z</updated><author><name>t.lundahl</name><uri>https://forge.codesys.com/u/t-lundahl/</uri></author><id>https://forge.codesys.com11b227877edc4a317ccd717d35e79d83e51bc3a1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Take a look at the "Resources Tab", there you will find the "Task Configuration" you can set the program execution to what ever your harware can handle.&lt;/p&gt;
&lt;p&gt;In the other example, why not use a standard "IF THEN" or "CASE".&lt;/p&gt;
&lt;p&gt;I think you need to do some control of the time in any case because you sometimes don't want execution in 20-30 sec.&lt;/p&gt;
&lt;p&gt;Hope this helps you.&lt;/p&gt;
&lt;p&gt;/Torbjörn&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Controlling Timing of a Function Block</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3a480537e3/?limit=25#5277" rel="alternate"/><published>2020-02-27T22:29:50.514000Z</published><updated>2020-02-27T22:29:50.514000Z</updated><author><name>Software Monkey</name><uri>https://forge.codesys.com/u/software-monkey/</uri></author><id>https://forge.codesys.comc4e80a49be07566f9e39aba2531ca026b5ef4b23</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am writing an algorithm in ST which needs to be called every 250mSec. At some stage (20 or 30 seconds), the algorithm sets a BOOLEAN flag and is complete. As a complete newbie to CoDeSys, I am not sure how best to do this. Do I...&lt;/p&gt;
&lt;p&gt;Write the algorithm so that it 'falls through' and then trigger it on a 250mSec timer (like you might do under Windows). If so, what kind of timer?&lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;Write it in a while loop so that the loop runs for the whole duration of the algorithm (20 or 30 seconds) but put some sort of delay timer to slow down execution of the loop to 250mSec.&lt;/p&gt;
&lt;p&gt;I read in another post that a while loop will block execution and probably trigger the watchdog but I am not sure if this would happen in my case.&lt;/p&gt;
&lt;p&gt;Hope I have explained the problem clearly enough!&lt;/p&gt;
&lt;p&gt;Any suggestions or comments would be greatly appreciated.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Tony&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>