<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to GENERATE TIME PERIOD</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/9ca05f1019/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/9ca05f1019/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/9ca05f1019/</id><updated>2020-02-27T20:42:00.692000Z</updated><subtitle>Recent posts to GENERATE TIME PERIOD</subtitle><entry><title>GENERATE TIME PERIOD</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/9ca05f1019/?limit=25#ab78" rel="alternate"/><published>2020-02-27T20:42:00.692000Z</published><updated>2020-02-27T20:42:00.692000Z</updated><author><name>hki75</name><uri>https://forge.codesys.com/u/hki75/</uri></author><id>https://forge.codesys.com772434e13f154f0b731d2a5c2524df54a2d851f2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;use OSCAT library..using the CLK_PRG FB you can generate a pulse (one shot) clock based on a defined time base, then you can create your square wave "manually"..&lt;/p&gt;
&lt;p&gt;this is a sample with T#500ms time base&lt;/p&gt;
&lt;p&gt;VAR&lt;br/&gt;
    PulseGen500ms:CLK_PRG;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;(&lt;em&gt; Pulse one shot 500ms  &lt;/em&gt;)&lt;br/&gt;
PulseGen500ms(PT:=t#500ms , Q=&amp;gt;_500ms );&lt;/p&gt;
&lt;p&gt;(&lt;em&gt; Clock 500ms  &lt;/em&gt;)&lt;br/&gt;
IF _500ms THEN&lt;br/&gt;
Clock500ms:=NOT Clock500ms;&lt;br/&gt;
END_IF;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>GENERATE TIME PERIOD</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/9ca05f1019/?limit=25#bca4" rel="alternate"/><published>2020-02-27T20:41:59.261000Z</published><updated>2020-02-27T20:41:59.261000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com247f6b45caf1c9749c619c70a7248a56f21146e3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;so you are looking for this particular block &lt;br/&gt;
i found in the eaton moeller standard lib.&lt;br/&gt;
another place for this is  w &lt;a class="" href="http://www.oscat.de" rel="nofollow"&gt;www.oscat.de&lt;/a&gt; w  with lots of functions also this type (it is english. download the codesys lib the pdf file and the txt file to study.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>GENERATE TIME PERIOD</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/9ca05f1019/?limit=25#f0e9" rel="alternate"/><published>2020-02-27T20:41:55.343000Z</published><updated>2020-02-27T20:41:55.343000Z</updated><author><name>carloseduardo</name><uri>https://forge.codesys.com/u/carloseduardo/</uri></author><id>https://forge.codesys.com00899bb869e2f5a660f8cb7e83f9fc4ff5bfb2af</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Well I would like to download the function block.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Niclas123 hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
I'm not sure if i'm getting it right, but is'nt this what you looking for?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Outputtime&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;UINT_TO_TIME&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;milliseconds&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;seconds&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;minutes&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hours&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;/Niclas&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>GENERATE TIME PERIOD</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/9ca05f1019/?limit=25#909f" rel="alternate"/><published>2020-02-27T20:41:53.933000Z</published><updated>2020-02-27T20:41:53.933000Z</updated><author><name>Niclas123</name><uri>https://forge.codesys.com/u/niclas123/</uri></author><id>https://forge.codesys.comf1e77a443c96c11f9aa8dfc64710b5caef637ab8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm not sure if i'm getting it right, but is'nt this what you looking for?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Outputtime&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;UINT_TO_TIME&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;milliseconds&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;seconds&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;minutes&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hours&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;/Niclas&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>GENERATE TIME PERIOD</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/9ca05f1019/?limit=25#7a2e" rel="alternate"/><published>2020-02-27T20:41:50.051000Z</published><updated>2020-02-27T20:41:50.051000Z</updated><author><name>carloseduardo</name><uri>https://forge.codesys.com/u/carloseduardo/</uri></author><id>https://forge.codesys.com17c332f9e600df8de05c73187dbf120811c424ed</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Dear all, I´m programming an 750-880 WAGO, and I need a function block to generate time periods, can you send me the library for the FB.?&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: FB CODESYS.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=489"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>