<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to freewheeling vs cyclic task</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e8a4d63391/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e8a4d63391/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/e8a4d63391/</id><updated>2021-12-17T07:12:46.970000Z</updated><subtitle>Recent posts to freewheeling vs cyclic task</subtitle><entry><title>freewheeling vs cyclic task</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e8a4d63391/?limit=250#4d4f" rel="alternate"/><published>2021-12-17T07:12:46.970000Z</published><updated>2021-12-17T07:12:46.970000Z</updated><author><name>dFx</name><uri>https://forge.codesys.com/u/dfx/</uri></author><id>https://forge.codesys.com41fe36dd8c6b6b739ec244107b12bf89358b619c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Maybe you could have a read of &lt;a class="" href="https://help.codesys.com/webapp/_cds_obj_task_configuration;product=codesys;version=3.5.14.0" rel="nofollow"&gt;Online Help - Task configuration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Watchdog is a protection mecanism. I don't know the exact behavior, but scheduling a task shorter than its execution time usually leads to schedule kill by the OS.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>freewheeling vs cyclic task</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e8a4d63391/?limit=25#e61b" rel="alternate"/><published>2021-12-15T14:51:36.413000Z</published><updated>2021-12-15T14:51:36.413000Z</updated><author><name>Inna</name><uri>https://forge.codesys.com/u/inna/</uri></author><id>https://forge.codesys.com589784567820bf40aadd9705482afa026bd88a67</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for your response.&lt;br/&gt;
Regarding "Increasing scanned code may lead to a watchdog trigger" , it is relevant only if watchdog is enabled. Am I correct?&lt;br/&gt;
What happens if some scans take more time than Interval time? &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>freewheeling vs cyclic task</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e8a4d63391/?limit=250#83ee" rel="alternate"/><published>2021-12-15T14:28:03.563000Z</published><updated>2021-12-15T14:28:03.563000Z</updated><author><name>dFx</name><uri>https://forge.codesys.com/u/dfx/</uri></author><id>https://forge.codesys.comf9f833975ac8b6fa5b84db5b7de718561a9b6ef4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;1.&lt;br/&gt;
    Pros&lt;br/&gt;
        Freewheel task length can be increased without much care&lt;br/&gt;
        Gives the fastest treatment and I/O refresh if you only need a task&lt;br/&gt;
    Cons&lt;br/&gt;
        As next scan depends on previous scan time, scan time is inconsistent with jitter, depending on your code and the machine situation&lt;br/&gt;
        Don't use is with any PID/PWM regulator, it's a bad idea (really bad)&lt;br/&gt;
2.&lt;br/&gt;
    Pros&lt;br/&gt;
        As scan times are more consistent, the machine tends to react the same, even if you have difference in scanned code from cycle to cycle&lt;br/&gt;
        Tasks can be priorized to do critical stuff faster, thus giving more reactivity to important stuff you want and less to stuff that don't need it.&lt;br/&gt;
        Only way to do motion or regulators&lt;br/&gt;
        Decrease cpu usage with a lower schedule of some tasks (network stuff ? HMI ?)&lt;br/&gt;
    Cons&lt;br/&gt;
         Cycle time should be defined with care&lt;br/&gt;
         Increasing scanned code may lead to a watchdog trigger&lt;br/&gt;
         Priorization should be done correctly or some task may take very long to end&lt;br/&gt;
         Priorization may lead to big time slice between two instructions&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Mostly if you need motion/regulators/safety, you will use cyclic tasks. Or to optimize some critical stuff and some less important.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</summary></entry><entry><title>freewheeling vs cyclic task</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e8a4d63391/?limit=25#d1dd" rel="alternate"/><published>2021-12-13T08:09:23.687000Z</published><updated>2021-12-13T08:09:23.687000Z</updated><author><name>Inna</name><uri>https://forge.codesys.com/u/inna/</uri></author><id>https://forge.codesys.com44b50866459b96eafe0762e5bb3b0ca1a135fd66</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
1.What are the advantages and disadvantages of using freewheeling task?&lt;br/&gt;
2.What are the advantages and disadvantages of using cyclic task?&lt;br/&gt;
3.How to determine what task type(freewheeling or cyclic) to use?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>