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.

Scripting
#1
Good morning,

I want to divide 50 Group Addresses in row (e.x. from 1.1.1 to 1.1.49) and write their results in 1.2.1 to 1.2.49.
Is this possible with a script?

Thank you in advance,
Chris Balatis
Reply
#2
Assign a common tag to all source objects (1/1/1..1/1/49) and map an event script to this tag. This script changes the destination group address middle part from 1 to 2, divides the event value by 10 and writes to the destination group address.
Code:
addr = event.dst:gsub('/1/', '/2/')
value = event.getvalue() / 10

grp.checkwrite(addr, value)
Reply
#3
The application we want is :

We have almost 50 G.A. from a DALI Gateway, which count the time in seconds, and we want to write them in 50 new G.A., which count the time in hours.
Reply
#4
Change 10 to 3600
------------------------------
Ctrl+F5
Reply


Forum Jump: