<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to cycle task bit in Codesys?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/45e4eee06d/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/45e4eee06d/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/45e4eee06d/</id><updated>2020-02-27T14:35:34.484000Z</updated><subtitle>Recent posts to cycle task bit in Codesys?</subtitle><entry><title>cycle task bit in Codesys?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/45e4eee06d/?limit=25#5b3c" rel="alternate"/><published>2020-02-27T14:35:34.484000Z</published><updated>2020-02-27T14:35:34.484000Z</updated><author><name>Rob</name><uri>https://forge.codesys.com/u/rob/</uri></author><id>https://forge.codesys.coma3c4cd2f501535369d63f6b616ff386a04c2e218</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It works like a charm now, thanks for your tip I-Campbell...this approach was quite simpler and more effective&lt;br/&gt;
Still, I'm always into difficulties when trying to pack functions as CTU or Timers in FBs and/or its methods...as a beginner I have to invest more time into this... &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>cycle task bit in Codesys?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/45e4eee06d/?limit=25#aa89" rel="alternate"/><published>2020-02-27T14:35:33.065000Z</published><updated>2020-02-27T14:35:33.065000Z</updated><author><name>Rob</name><uri>https://forge.codesys.com/u/rob/</uri></author><id>https://forge.codesys.com43b84ca2c22b47a59c633ee35496e9352bfbd89d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;I-Campbell hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Sounds like you are using ladder?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Indeed I‘m using ST....but I will go to the codesys online help and check the ADD function’s features&lt;br/&gt;
Edit: (   ....the ADD function is in ST simply a:=a+1 ....of course. I will try this approach )&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>cycle task bit in Codesys?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/45e4eee06d/?limit=25#fb3f" rel="alternate"/><published>2020-02-27T14:35:32.532000Z</published><updated>2020-02-27T14:35:32.532000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com2d9c9cd2e676b380ad1834f683ac810a365a2973</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I usually use the ADD instruction for "count up every time this is called."&lt;br/&gt;
Sounds like you are using ladder?&lt;br/&gt;
Add a box with EN/ENO and I think in Codesys it is ADD, it could be +&lt;br/&gt;
Your first input is Count, second input 1, output is Count.&lt;br/&gt;
Count is a variable of data type DINT.&lt;br/&gt;
Next step, how to reset your counter.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>cycle task bit in Codesys?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/45e4eee06d/?limit=25#564b" rel="alternate"/><published>2020-02-27T14:35:31.984000Z</published><updated>2020-02-27T14:35:31.984000Z</updated><author><name>Rob</name><uri>https://forge.codesys.com/u/rob/</uri></author><id>https://forge.codesys.comc1c27eb785402f2813480b28076c412f1af2b6fb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all,&lt;br/&gt;
I wanted to use a cyclic task to read a device status signal every minute.&lt;br/&gt;
In doing so, every check per minute should be totalized by a counter (CTU).&lt;br/&gt;
The obvious issue is, if the signal is "always" on, every minute when the reading check will be performed, there will be no rising edge per scan cycle to increase the counter up, namely no change in the PLC's input image.&lt;br/&gt;
Therefore I had thought of using a cyclic bit in series with the signal. The cyclic bit should be set from off to on every time the task is executed....but I haven't found so far cycle bits as I know it from Siemens PLCs.&lt;br/&gt;
My second attempt was to initialize a bool variable to TRUE at the beginning of the task and set it to FALSE at the end of it. But I can't manage to make it work together with the FB in charge of counting up the pulses ( related to this:  l &lt;a class="" href="https://forum.codesys.com/viewtopic.php?f=11&amp;amp;t=10030" rel="nofollow"&gt;viewtopic.php?f=11&amp;amp;t=10030&lt;/a&gt; l  ) &lt;/p&gt;
&lt;p&gt;How do you perform operations with counters implemented on cyclic tasks for steady signals as the one described?&lt;br/&gt;
Thanks for your hints!&lt;br/&gt;
Rob&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>