Sign in to follow this  
Followers 0
Bryll

CPU Clock

5 posts in this topic

Hi, I would like to set up a S7-315 2PN/DP with two TP900 panels and read the system clock from the PLC. The clock should also be possible to set from the panels. I have been reading the messy information given by Siemens help pages in the software (TIA V12). It's not very clear how to control the system clock from the panels, at least not for me since I'm a Mitsubishi guy. Another guy at the forum once wrote "When it comes to Siemens, information is as clear as mud" Do I need to write PLC code using some SFB's to be able to set date and time ? In wich registers can the clock data be found ? Is it possible in runtime to switch between 12 and 24 hour format ? And so on......

Share this post


Link to post
Share on other sites
In such networks (single PLC and multiple HMIs), CPU is a "time master" (where master clock is). You synchronise HMI clocks using AREA POINTER (communication tab in WinCC). On screen, then you put a filed with Date/time tag, showing SYSTEM TIME. How to set master clock in PLC using both HMI? In some DB in PLC you must have a variable type DTL. Then, on screen, make a filed with DTL type INPUT/OUTPUT connecting that PLC variable from DB. Then, create a button to set one bit. Then, in PLC, when that bit is on positive edge, write that variable in PLC RTC using WRITE SYSTEM TIME istruction. Edited by Homer_BL

Share this post


Link to post
Share on other sites
Thanks Homer, I'll give it a try. But, are the date/time variables hidden in the PLC ? I'm used that I can access them directly just as easy that I read MW50 or any other integer.

Share this post


Link to post
Share on other sites
There are SFB's to set and read the clock

Share this post


Link to post
Share on other sites
Yep, found them, used them, wrote some code and it's now up and running

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