<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to System time</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5f20fa19e5/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5f20fa19e5/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5f20fa19e5/</id><updated>2020-02-27T22:56:31.341000Z</updated><subtitle>Recent posts to System time</subtitle><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#8c53" rel="alternate"/><published>2020-02-27T22:56:31.341000Z</published><updated>2020-02-27T22:56:31.341000Z</updated><author><name>Igor Petrov</name><uri>https://forge.codesys.com/u/igor-petrov/</uri></author><id>https://forge.codesys.com59ed95448ad8f8976c275c0d610203386c0dc5a7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Indeed the project was an appendix for our rather big &lt;a class="" href="http://www.prolog-plc.ru/docs/TimeExperience.pdf" rel="nofollow"&gt;article in Russian &lt;/a&gt;. It would be rather difficult to translate it to English completely   . &lt;/p&gt;
&lt;p&gt;The project file comments translation would bring you nothing since the library includes the same functions with English comments.&lt;/p&gt;
&lt;p&gt;Main functions: &lt;/p&gt;
&lt;p&gt;Input: DATE; Output: year, month, day of the month&lt;br/&gt;
  Input: TIME; Output: hour, minute, second, ms&lt;br/&gt;
     Input: year, month, day of the month; Output: DATE&lt;br/&gt;
      Input: hour, minute, second, ms; Output: TIME&lt;/p&gt;
&lt;p&gt;Input: DATE, TIME_OF_DAY; Output: TD&lt;br/&gt;
       Input: TOD1, TOD2; Output: TIME&lt;br/&gt;
       Input: UINT 2 digits year; Output:  UINT 4 digits year&lt;br/&gt;
  Input: UINT year; Output: BOOL&lt;br/&gt;
     Input: DATE; Output: UINT weekday number&lt;br/&gt;
        standard RTC realization example, based on TON&lt;/p&gt;
&lt;p&gt;Outer functions are only auxiliary for main functions. &lt;/p&gt;
&lt;p&gt;Conversions based on &lt;strong&gt;fast algorithms &lt;/strong&gt;without cycles.&lt;/p&gt;
&lt;p&gt;Just tell me if you have problems to understand some functions or algorithms. I will try to describe it in details.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#b534" rel="alternate"/><published>2020-02-27T22:56:29.749000Z</published><updated>2020-02-27T22:56:29.749000Z</updated><author><name>cica-draza</name><uri>https://forge.codesys.com/u/cica-draza/</uri></author><id>https://forge.codesys.com4a28e4be2159a38348279bc2fe3ace9f9394f59a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanx &lt;/p&gt;
&lt;p&gt;I have downloaded but I have a problem. I don't know Russian (only few words I know are something like ya tebya lyublyu for my girlfriend )&lt;/p&gt;
&lt;p&gt;Big procent of that lib I figured out what is going on inside but not all. &lt;/p&gt;
&lt;p&gt;have you some version in english?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#72d7" rel="alternate"/><published>2020-02-27T22:56:25.254000Z</published><updated>2020-02-27T22:56:25.254000Z</updated><author><name>Igor Petrov</name><uri>https://forge.codesys.com/u/igor-petrov/</uri></author><id>https://forge.codesys.com6059da8ece3bbcbfee78c229ac77c442dcd2bdfa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You are right. It is good solution for emulation mode.&lt;/p&gt;
&lt;p&gt;By the way, you may download our free &lt;strong&gt;TimeExp.lib &lt;/strong&gt;&lt;a class="" href="http://www.prolog-plc.ru/docs/timeexp.zip" rel="nofollow"&gt;http://www.prolog-plc.ru/docs/timeexp.zip&lt;/a&gt; includes effective date and time manipulation functions.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#4338" rel="alternate"/><published>2020-02-27T22:56:23.645000Z</published><updated>2020-02-27T22:56:23.645000Z</updated><author><name>cica-draza</name><uri>https://forge.codesys.com/u/cica-draza/</uri></author><id>https://forge.codesys.com599946836e932923bbac137d37ead45535ec88ae</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I realize it! &lt;/p&gt;
&lt;p&gt;It is simple.  &lt;/p&gt;
&lt;p&gt;Just used RTC block. &lt;/p&gt;
&lt;p&gt;It has 4 variables:&lt;/p&gt;
&lt;p&gt;enable &lt;/p&gt;
&lt;p&gt;InputDateAndTime as DT&lt;/p&gt;
&lt;p&gt;Q as bool&lt;/p&gt;
&lt;p&gt;OutDateAndTime as DT&lt;/p&gt;
&lt;p&gt;As soon as EN becomes TRUE, the time of InputDateAndTime is set, is counted up in seconds and returned in OutDateAndTime as long as EN is TRUE. As soon as EN is reset to FALSE, OutDateAndTime is reset to the initial value DT#1970-01-01-00:00:00.&lt;/p&gt;
&lt;p&gt;InputDateAndTime can be left out and than time and date are readen from the System. &lt;/p&gt;
&lt;p&gt;Finally. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#043c" rel="alternate"/><published>2020-02-27T22:56:19.137000Z</published><updated>2020-02-27T22:56:19.137000Z</updated><author><name>cica-draza</name><uri>https://forge.codesys.com/u/cica-draza/</uri></author><id>https://forge.codesys.comf4b84fe1f744b0ebc54bb06b34fa1828c931a879</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm just a student and I don't have PLC. &lt;/p&gt;
&lt;p&gt;I'm doing some project for my exam and I need to make ST program only for virtual PLC.  &lt;/p&gt;
&lt;p&gt;I have ST program, visualization and that's it. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#f901" rel="alternate"/><published>2020-02-27T22:56:17.530000Z</published><updated>2020-02-27T22:56:17.530000Z</updated><author><name>Igor Petrov</name><uri>https://forge.codesys.com/u/igor-petrov/</uri></author><id>https://forge.codesys.com981102254834f0108999d2944609660fed6fa034</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;cica_draza hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
 ... I don't have library SysLibRtc.lib. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Indeed, System Libs are external libraries with realizations inside runtime system. &lt;/p&gt;
&lt;p&gt;If yours PLC has RTC and manufacturer (OEM) support appropriate library then CoDeSys Library Manger will discover SysLibRtc.lib without any trick.&lt;/p&gt;
&lt;p&gt;OEM may develop specialized library for system time access. &lt;/p&gt;
&lt;p&gt;The questions are: &lt;/p&gt;
&lt;p&gt;Does yours PLC have RTC hardware? &lt;/p&gt;
&lt;p&gt;How OEM supports the RTC?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#a49b" rel="alternate"/><published>2020-02-27T22:56:12.976000Z</published><updated>2020-02-27T22:56:12.976000Z</updated><author><name>cica-draza</name><uri>https://forge.codesys.com/u/cica-draza/</uri></author><id>https://forge.codesys.com1b7321ef2b23887a8851bd48bebd32842e4ec222</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanx for reply but I don't have library SysLibRtc.lib.&lt;/p&gt;
&lt;p&gt;I search whole 3s folder but cannot find it. Can you post it here or mail it to me? Please?  &lt;/p&gt;
&lt;p&gt;Maybe some other way?&lt;/p&gt;
&lt;p&gt;Please help my deadline is comming...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#2c81" rel="alternate"/><published>2020-02-27T22:56:11.259000Z</published><updated>2020-02-27T22:56:11.259000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com6a7a7f97699ddd5bb6de68cd75a483832705808f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Gast&lt;/p&gt;
&lt;p&gt;try&lt;/p&gt;
&lt;p&gt;ActDateAndTime := SysRtcGetTime(dummy);&lt;/p&gt;
&lt;p&gt;with ActDateAndTime as DT&lt;/p&gt;
&lt;p&gt;and dummy as BOOL.&lt;/p&gt;
&lt;p&gt;SysRtcGetTime ist a function from SysLibRtc.lib&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>System time</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5f20fa19e5/?limit=25#9acd" rel="alternate"/><published>2020-02-27T22:56:09.616000Z</published><updated>2020-02-27T22:56:09.616000Z</updated><author><name>cica-draza</name><uri>https://forge.codesys.com/u/cica-draza/</uri></author><id>https://forge.codesys.comcbfb76af66c6acc240117f15ad0b3ec87840c12a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Please help. &lt;/p&gt;
&lt;p&gt;I don't know how to read System date and time. I supose that SysLibTime.lib is answer but I don't know how to use this library. &lt;/p&gt;
&lt;p&gt;I would like to set value in variable X of system date and time in ST. &lt;/p&gt;
&lt;p&gt;Thanx. &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>