This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Object On Time
#2
You can use updatetime for this..

grp.find('1/1/1').updatetime wil give you the unix timestamp that you can compare with os.time() to calculate the seconds the object has this value.

You can use storage to store this value when using event based scripts so you can fetch the value from storage from last event and then store new timestamp again.

You mentioned period usage, why not using a trend on a value and use trend.fetchone to get the usage over a set period?

https://kb.logicmachine.net/libraries/trends/
Reply


Messages In This Thread
Object On Time - by sjfp - 09.07.2026, 06:09
RE: Object On Time - by Erwin van der Zwart - 09.07.2026, 06:52
RE: Object On Time - by admin - Today, 06:43

Forum Jump: