Sign in to follow this  
Followers 0
sparkotronic

Time and date adjust via TP170A

8 posts in this topic

Is it possible to adjust the Time and date on the PLC via my TP170A? It's a bit of a pain having to go online with the PC to adjust this. Thanks in advance, Colin

Share this post


Link to post
Share on other sites
Is the PLC a 200 range or 300/400 range? Not sure about the 200, but the 300/400 range PLC's have blocks that allow allow changes to the PLC clock. I don't have my S7 program here so cannot be specific. I'm presuming that the PLC can read the TP170A clock as well here.

Share this post


Link to post
Share on other sites
It's a 314. I don't think that the TP170A has a clock. I set it up to display the time on the PLC, but if my factory has a power cut, it losses the correct time. The PLC doesnt have a battery so it doesn't retain the time and date. I'm sure that you can do it through the TP170B.

Share this post


Link to post
Share on other sites
So you want to enter a value h:m:s into the HMI and press a button and that becomes the PLC clock time OK thats possible, there are SFC's for clocks SFC 0 - Setting the TOD "SET_CLK" SFC 1 - Reading the Time "READ_CLK" SFC 48 - Synchronising Slave Clocks "SNC_RTCB" SFC 100 - Setting the Time-of-Day and the TOD Status "SET_CLKS". There a an SFC manual for S7, SFC_e.pdf, which can be found on the Siemens site, http://support.automation.siemens.com/WW/l...amp;treeLang=en

Share this post


Link to post
Share on other sites
The TP170A hasn't got a built in clock. I take it that what you are explaining is for the clock on the HMI to set the time on the PLC. Sorry if I'm a bit thick, I'm kind of self taught I

Share this post


Link to post
Share on other sites
I took it from you previous posts that your HMI has no clock. What I am suggesting is that you could set up a page where the HMI could display the PLC clock current time. From that page have user entries for hours, minutes and seconds and on pressing a button have these figures entered into the clock. By using the above SFC's this could be achievable.

Share this post


Link to post
Share on other sites
You couldn't send me some sample code could you? I seem to be struggling with it a bit. What do I need to add to the program to adjust the time and date? I've looked at SCF0, 48 and 100 but they dont really tell you how to program them? I think I need a training course!

Share this post


Link to post
Share on other sites
The attachment can be imported, I have used FB100 and UDT1, you can re-address if you have already used these before compiling. Hope it helps. datetime.zip

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