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 Mon Nov 19, 2018 10:15 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: System Date Time
PostPosted: Fri Jul 13, 2018 1:29 pm 
Offline

Joined: Sat Jun 02, 2018 2:29 am
Posts: 3
Now i have to find “How to get the system date and time”

> I download “date time”. In store library.
> Can you guide me , how can i program to get date and time.
> My application , set up time to open /close lamps in my house.
> Example
> Lamp on 18:00 to 5:00,
> Thanks


Top
   
 Post subject: Re: System Date Time
PostPosted: Mon Aug 20, 2018 3:14 pm 
Offline

Joined: Wed Jul 11, 2018 10:44 am
Posts: 7
Hello,

VAR
fbGetSystemTime : GETSYSTEMTIME;
fileTime : T_FILETIME;
sTime : STRING;
END_VAR
_______________________

fbGetSystemTime(timeLoDW=>fileTime.dwLowDateTime, timeHiDW=>fileTime.dwHighDateTime );
sTime := SYSTEMTIME_TO_STRING( FILETIME_TO_SYSTEMTIME(fileTime));


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 8 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