Sign in to follow this  
Followers 0
Kenwei8011

Siemens PLC Time Synchronization by a pulse

6 posts in this topic

Hi all expert, I have a standalone Siemens S7-400 PLC and I would like to set the time daily by an input DI signal. The DI will send a pulse to the PLC everyday at the same time, let says 12:00:00. How can i achieve this? Thanks. Hope I can get this done soon. Best regards, Ken

Share this post


Link to post
Share on other sites
Look at the SFC block for inputting Date and Time Instructions for inputting the date and time with SFC0 (SET_CLK) With SFC0 "SET_CLK" (set system clock) you can set the date and time in a CPU. The CPU clock then runs as of this time and date set. With the statement:

Share this post


Link to post
Share on other sites
Hi Moggie, From the help file, SFC0 "SET_CLK" input type is (e.g "DT#2014-03-04-10:30:30") which the date will be set also? Meaning everyday when PLC received the pulse, the clock then runs starting from the set time and set date? Is there anyway I can set only for time HH:MM:SS? For example, the set time is "12:00:00", tomorrow when the PLC received the pulse, the PLC clock should become "2014-03-05-12:00:00" and next day "2014-03-06-12:00:00"... Thanks.

Share this post


Link to post
Share on other sites
hi Kenwei8011, the SFC0 will set the "static" DT time specified into function instance. So, no automatic time update is foreseen into SFC0, just force the PLC time to the SFC0, PDT parameter. Why not use updating with NTP? do you have CP443 card on your configuration? Regards

Share this post


Link to post
Share on other sites
The above shows how to read out the current data and time using SFC 1 Simply over write the Hour, Min, seconds data areas with the required time then write back to the PLC using SFC 0

Share this post


Link to post
Share on other sites
Hi Moggie, Thank you so much. It works perfectly for me. Best regards, Edited by Kenwei8011

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