6/10/2020 3:20 PM | |
Joined: 1/24/2014 Last visit: 9/26/2025 Posts: 127 Rating:
|
Hi, I want to save the machine life time (only when effectively running) For this, I use a simple pulse (1s) when my machine is running LT_TIME := LT_Time + t#1s ; (LTime because it can go to 106751 day... it's 300years !) It is working, now I want to display it on the HMI, if I use an I/O field directly, it is a "second format" (I try decimal, string...), don't really usefull... is there a solution here in WinCC ? I can eventually use 4 tags (int) in different I/O field : Days, Hour, Minute, Seconds ; but I don't know how to convert, in the CPU, LTime to this differents tags (perhaps convert to Lint, and use math) I was expecting something like : "LTime.day" "Ltime.hour" ... Last question, Here, I have a 1500 with a TP1200 comfort, but my question is for all the CPU we are using (1200, 1500) but LTime is 1500's only. Do I have to make a "DIY life time saver" ? This : https://support.industry.siemens.com/tf/fr/fr/posts/convert-ltime-s7-1500-to-udt-date-hour-minute-second/117721/?page=0&pageSize=10 Don't work |
6/11/2020 6:12 PM | |
Joined: 3/30/2020 Last visit: 9/26/2025 Posts: 5480 Rating:
|
The LTIME datatype is a 64-bit signed number that represent nanoseconds. There are code published in SIOS that expand TIME to D / H / M / S / MS. So also is there a TIME-to-STRING converter in the Library of General Functions (LGF). I know of no prepared code published here that helps for LTIME.
|
Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
Follow us on