Sign in to follow this  
Followers 0
Saik

Current Date

2 posts in this topic

Hi all, I'm new with PLC, quick question, is there any function can help me update the date everyday in ST? Thanks. Edited by Saik

Share this post


Link to post
Share on other sites
Hello, It will depend on what has been enabled with the CoDeSys runtime that was implemented on the hardware you are using, however if enabled you can use a library called SysLibRTC.lib to be able to get the time from the internal Real Time Clock (SysRTCGetTime), or use SysRTCSetTime to set the time of the Real Time Clock. Also, I'm not sure if it was developed for Turck or not, but we use a library called SNTPTime.lib which enables communication with an SNTP time server. Hope it helps! Nick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0