gregory.maury - 2009-07-16

Hello,

I need some help about the configurating of the PLC time.

I have a program which contains many variables.

To keep a record when variables change. So I use an ARRAY[1..2,1..40] 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.

So I used the SysLibRtc.lib which contains two functions SysRtcGetTime() and SysRtcSetTime().

The first function needs it to send a boolean and the return is a DATE_AND_TIME type.

If no time initialization of the PLC, the time is dt#1970-01-01-00:00:00.

That's why I would like to use SysRtcSetTime() which normally set the PLC time to the time I want.

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.

If someone know a solution ?

Thanks in advance