CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun May 19, 2019 9:24 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri May 10, 2019 12:37 pm 
Offline

Joined: Tue Mar 05, 2019 1:58 pm
Posts: 6
Hello,

I have question, what is ideal way to manipulate with varible of DATE_AND_TIME (DT) type. I want to make Visu for changing RTC time on Raspberry. My system CODESYS V3.5 SP14 Patch2.

I get time from system RTC clock with this function:
UtcTime := SysTimeRtcGet(dummy);

Now i need e.g. add one hour or one month and write UtcTime back to system with SysTimeRtcSet().

I tried instal OSCAT library and use function HOUR_OF_DT, but compiler say: "HOUR_OF_DT not defined" :( . I donĀ“t know why, only in manual is writen, that OSCAT support only 32bit system and my Raspberry 3B+ is 64bit.

Is there some oficial system library to work easy with date and time?

Thanks for info, Lubos.


Top
   
PostPosted: Fri May 10, 2019 5:38 pm 
Offline
Frequent User
Frequent User

Joined: Sun Apr 15, 2007 1:18 am
Posts: 160
You can find an example in the CODESYS STORE : Date and Time (https://store.codesys.com/date-and-time.html)


About OSCAT be careful, OSCAT function blocks often use other OSCAT function blocks
and, for date and time management, they use a Data type (from OSCAT lbrary) called CALENDAR.

BR


Top
   
PostPosted: Wed May 15, 2019 11:22 am 
Offline

Joined: Tue Mar 05, 2019 1:58 pm
Posts: 6
Thank You JAPIB very much for helping me...
I used Util.SplitDateTime function for conversion. I didn't know about UTIL before...

Btw, is there some detailed documentation for standars 3S libraries? Only documentation, what i can find is short description of functions in Library Manager, but it is not sometimes enought :(
The only source of library description find i on this forum in question, but is somewhere oficial LIBRARY DOCU to easy find?
BR


Top
   
PostPosted: Wed May 15, 2019 10:04 pm 
Offline
Frequent User
Frequent User

Joined: Sun Apr 15, 2007 1:18 am
Posts: 160
Hello,

You can have a look on the internet site 'CODESYS Help', for example here :
https://help.codesys.com/webapp/idx-sta ... n=3.5.14.0
I think it's the simplest and most up-to-date.

Otherwise there is some help files (Standard.chm, Util.chm, ...) installed on your PC during the installation of CODESYS.
You can find it on :
C:/Program files/CODESYS 3.5.../CODESYS/Online Help/En

You must use 'Program files' with CODESYS V3.5 64 bits ou 'Program files (x86)' with CODESYS V3.5 16 bits.
(Access paths correspond to a use of Windows 7, with other versions it may be different :oops: )

BR


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited