Page 1 of 1

date & time with S7 ISO over TCP

Posted: Thu Jan 31, 2013 9:38 am
by charlyprouteau
I use a TA150 with a Siemens PLC throught ethernet and I use controller S7 ISO over TCP 4.11.05.
On controller help, It is noted that clock tag is not available for all HMI models. And I tried to have time and date from my PLC on HMI, but actually I cannot.
Could you tell me if I can read PLC date&time on the TA150? and How?
Thanks for your reply

Re: date & time with S7 ISO over TCP

Posted: Thu Jan 31, 2013 10:09 am
by mark.monroe
The Clock Tag only works when you are using Exters. In iX Developer, to display the PLC time, you would have to create a memory location in the PLC that you copy the time to, and then map a tag from the HMI to that memory location.

If you wanted to set the HMI time from the PLC, you would need to write a script in C# that sets the HMI time.

Here is another post regarding your question.

Re: date & time with S7 ISO over TCP

Posted: Fri Feb 01, 2013 2:08 am
by charlyprouteau
Thanks for your answer.
Have you got a C# script already done?

Re: date & time with S7 ISO over TCP

Posted: Fri Feb 01, 2013 9:30 am
by mark.monroe
I have attached a project that has C# code in it that allows you to change the system time.
BenTime_A7.zip
(26.67 KiB) Downloaded 1120 times

Re: date & time with S7 ISO over TCP

Posted: Thu Mar 07, 2013 1:58 am
by charlyprouteau
And How can I set date & time on a runtime application (on a PC application)? Because this script doesn't work.

Re: date & time with S7 ISO over TCP

Posted: Thu Mar 07, 2013 9:15 am
by mark.monroe
The script only works for Windows CE terminals. There are many examples online on how to set the PC's time using C#. We provide a Win CE example because it is not easy to do.

Re: date & time with S7 ISO over TCP

Posted: Sat Apr 13, 2013 5:46 pm
by Fmedeiros
Hello,

I have a T4A connected to a S7-1200 via IsoTcp. In my program the time and date of the PLC has to be always synchronized with the HMI. I've tried many different ways to do this, by having the PLC date and time to be the master, and vice versa, but haven't been able to solve it.
Is it possible to transfer the value of the system time tags of the T4A to mapped tags of the S7-1200? Like with C# or something?

Thanks

Re: date & time with S7 ISO over TCP

Posted: Mon Apr 15, 2013 8:40 am
by mark.monroe
Yes, there are system tags on the HMI that allow you to map each component of the HMI's date and time to a register. That way you could send the HMI's time to the PLC. You might be able to do the same thing on your PLC, and send the date & time to the HMI. Going from the PLC to the HMI would allow you to set the HMI's time from the PLC time. An example of how to set the HMI's time via C# was previously posted in this thread.
Snap 2013-04-15 at 08.36.27.jpg
Snap 2013-04-15 at 08.36.27.jpg (108.68 KiB) Viewed 18944 times

Re: date & time with S7 ISO over TCP

Posted: Thu Apr 18, 2013 2:47 am
by Fmedeiros
Thank you Mark.

My problem is solved.