<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to use the SysLibRtc.lib</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/132df43119/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/132df43119/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/132df43119/</id><updated>2020-02-27T23:26:35.917000Z</updated><subtitle>Recent posts to How to use the SysLibRtc.lib</subtitle><entry><title>How to use the SysLibRtc.lib</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/132df43119/?limit=25#e49c" rel="alternate"/><published>2020-02-27T23:26:35.917000Z</published><updated>2020-02-27T23:26:35.917000Z</updated><author><name>gregory.maury</name><uri>https://forge.codesys.com/u/gregory-maury/</uri></author><id>https://forge.codesys.comb2e78cdae6db966c1d2be3d4287f56c86f7f4a0e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I need some help about the configurating of the PLC time.&lt;/p&gt;
&lt;p&gt;I have a program which contains many variables.&lt;/p&gt;
&lt;p&gt;To keep a record when variables change. So I use an ARRAY&lt;span&gt;[1..2,1..40]&lt;/span&gt; OF INT which uses like a buffer. In the first column an ENUMERATION and in the second column I would like to put the time when the corresponding variable is changed.&lt;/p&gt;
&lt;p&gt;So I used the SysLibRtc.lib which contains two functions SysRtcGetTime() and SysRtcSetTime().&lt;/p&gt;
&lt;p&gt;The first function needs it to send a boolean and the return is a DATE_AND_TIME type.&lt;/p&gt;
&lt;p&gt;If no time initialization of the PLC, the time is dt#1970-01-01-00:00:00.&lt;/p&gt;
&lt;p&gt;That's why I would like to use SysRtcSetTime() which normally set the PLC time to the time I want.&lt;/p&gt;
&lt;p&gt;So I send DATE_TIME type e.g. dt#2009-07-16-15:59:00. But the return is still FALSE and when I do a SysRtcGetTime() it's still near the 1970s.&lt;/p&gt;
&lt;p&gt;If someone know a solution ?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>