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.

Updating multiple group adresses
#1
Hi

I would like when i receive a value in one group address to be able use this value and send it to other group addresses. 
Like for example adress 1/1/1 sends value then i am able to update group 1/1/2 and 1/1/3 with the same value.

Anyone have an idea how to achive this?
Reply
#2
Attach an event script to 1/1/1. Make sure that all objects have the same datatype and check that no loops are produced by these scripts.
Code:
value = event.getvalue()
grp.write('1/1/2', value)
grp.write('1/1/3', value)
Reply
#3
This works great. But now client want delay in between the telegrams. Could it work to put a os.sleep function between.
Function i want is. Main telegram goes out. Then he want that second group adress gets the value and sends it with a delay og 3 seconds and then the last one with a delay of 10 sec after the main group sends its telegram.

Could this work?

value = event.getvalue()
grp.write('1/1/2', value)
os.sleep(3)

grp.write('1/1/3', value)
os.sleep(10)
Reply
#4
The delay should be before grp.write
------------------------------
Ctrl+F5
Reply
#5
(10.12.2020, 06:27)admin Wrote: Attach an event script to 1/1/1. Make sure that all objects have the same datatype and check that no loops are produced by these scripts.
Code:
value = event.getvalue()
grp.write('1/1/2', value)
grp.write('1/1/3', value)

(23.12.2020, 10:37)Daniel. Wrote: The delay should be before grp.write
Thanks alot.
Reply


Forum Jump: