# Siemens S5Time (Timer) data type

**URL:** <https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091>\
**Category:** Ignition\
**Created:** [March 24, 2013, 9:17am UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091 "2013-03-24T09:17:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [March 24, 2013, 9:17am UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/1 "2013-03-24T09:17:22Z")

</div>

I’m working a lot with Siemens Simatic PLC’s. These PLC’s have a special timer (S5Time) data type for timers.

It would be very nice, if this data type could be added to Ignition Siemens driver.  
Now we must put the timer value in Ignition as INT, and the conversion from INT to S5time is done in PLC. If you have only a few timers, then is not some much trouble, but if you have a lot of them,…

Here is the link to the Siemens web page about structure of S5time data type:  
[http://support.automation.siemens.com/WW/view/en/38487161](http://support.automation.siemens.com/WW/view/en/38487161)

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [March 24, 2013, 11:57am UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/2 "2013-03-24T11:57:59Z")

</div>

This already came up some time ago. As a workaround you can use an additional expression tag to convert to S5TIME format. See [this](http://www.inductiveautomation.com/forum/viewtopic.php?f=70&t=9291&p=31933) topic for an example.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [March 24, 2013, 7:13pm UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/3 "2013-03-24T19:13:09Z")

</div>

Thank you @chi.  
As soon as I saw your post I remembered, that I already saw that.

Yes, as workaround it’s working.  
My point is, that this could/should be implemented in the Ignition Siemens driver.

Another question @chi:

Your ‘solution’ is working good for writing s5time to PLC.  
How about reading it back (from PLC to Ignition)?  
So that there can be one input/output field for setting/viewing timer values…

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [March 25, 2013, 5:17pm UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/4 "2013-03-25T17:17:14Z")

</div>

You my try importing the attached files. It is an UDT (S5TIME) and a templated input field.  
Insert the template in a window and drag an UDT instance to the template. The UDT itself has a parameter for the OPC address.  
It is a bit complicated to use custom value scaling in Ignition, so this is the best solution i found so far.  
[S5TimeInput\_Template.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d3e3e7147766c83803fc0dc2ef8a68c1793e7b63.proj) (5.54 KB)  
[S5Time\_UDT.csv](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/edff9f562f0300fb1095b73a29c4f25df00ecbf5.csv) (2.86 KB)

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [March 27, 2013, 9:07am UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/5 "2013-03-27T09:07:20Z")

</div>

Thank you @Chi. ![:thumb_right:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/2026e28c0c425034352c1b75807edf956adc75f4.gif ":thumb\_right:")

I’ve tried and it’s working great. ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:")

I hope, that Ignition people will integrate that in the Siemens driver soon.

Regards  
from sLOVEnia

---

<div class="post-metadata">

**Author:** ![vanko26](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@vanko26](https://forum.inductiveautomation.com/u/vanko26)\
**Post date:** [August 7, 2017, 12:44pm UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/6 "2017-08-07T12:44:36Z")

</div>

Hi there.  
When I try to download the files it gives me 404. Could you upload them again please? I’m in a need to convert S5TIME to integer or float for display purposes. Thanks!

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [August 7, 2017, 7:56pm UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/7 "2017-08-07T19:56:19Z")

</div>

Hi, here are the files. This is an export from Ignition 7.7.  
[S5TIME\_UDT.xml](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d522c7709fd30741cd8131e9553dc06bd483114f.xml) (2.9 KB)  
[Template\_S5TimeInput.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e5a91f2abb2e7a6358fab94b0a65dd255581c0da.proj) (5.6 KB)

---

<div class="post-metadata">

**Author:** ![vanko26](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@vanko26](https://forum.inductiveautomation.com/u/vanko26)\
**Post date:** [August 8, 2017, 3:22pm UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/8 "2017-08-08T15:22:05Z")

</div>

Thanks chi!  
I did it a different way. I used the IEC FC (S5TIME to TIME) to convert it to time and then it was easy to format it in ignition. Thanks!

---

<div class="post-metadata">

**Author:** ![manutchaisrichai](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@manutchaisrichai](https://forum.inductiveautomation.com/u/manutchaisrichai)\
**Post date:** [January 11, 2020, 11:27am UTC](https://forum.inductiveautomation.com/t/siemens-s5time-timer-data-type/6091/9 "2020-01-11T11:27:07Z")

</div>

Thanks a lot!
