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.

Multiple GA send on 3 times
#1
If I have 700 1-bit GA, when they switch state I need it to happen 3 times, with 1 sec delay, what is the easiest way of doing this?
We have some KNX relays that is partially defective, and this is a quick workaround to get this working before the manufacture and the customer finds out if all the relays needs to be exchanged.

Best regards

Simon
Reply
#2
Try this, Tag all your bit objects with a TAG and then create event based script triggered by your TAG.
As execution mode select Last instance and use this script

Code:
123456789
if event.sender ~= "se" then     value = event.getvalue()     os.sleep(1)     grp.write(event.dst, value)     os.sleep(1)     grp.write(event.dst, value)     os.sleep(1)     grp.write(event.dst, value) end
------------------------------
Ctrl+F5
Reply
#3
I'm working with Simon on the project.
We've come to the solution that we want to make a script for each switch to make a script to check, whether the feedback is updated or not.

Something like this:
Code:
123456789101112131415161718
value = event.getvalue() if value == false then   revalue = true elseif value == true then   revalue = false end os.sleep(0.5) FB = grp.getvalue('1/0/1') if FB ~= value then   grp.write('1/0/0', revalue)   os.sleep(0.5)   grp.write('1/0/0', value) end

We do have 750 switch objects that we need to apply this script to. Is there a relative easy workaround with this?

And sorry for my straight forward scripting... Still learning Smile

Thanks!
Reply
#4
To use a global script on many objects you need some sort of repetitive relation between this group of objects, it can be by group address or by group name. In other word by knowing the input object (address or name) we need to create output object
What is the event object and what is the output.
------------------------------
Ctrl+F5
Reply
#5
Like this, and it just keeps going for 750 pairs

T/S is switch and FB is feedback Smile

Attached Files Thumbnail(s)
   
Reply
#6
Are you trying to flick over the switch if status is different or the other way around?
------------------------------
Ctrl+F5
Reply
#7
In the case of:
- There is sent 1 to the switch.
- The feedback doesn't change from off to on
- I want to send 0 to the switch, then 1 to the switch, since that makes the feedback follow ( usually ).

Does that make sence?
Reply
#8
do you want to write it to the bus or just update object in LM?
------------------------------
Ctrl+F5
Reply
#9
Tag all your switch (T/S) objects but not the status FB and create event script triggered by your tag.
Execution mode - Fist instance only
Code:
12345678910111213141516171819202122232425262728
if event.sender ~= "se" then value = event.getvalue() status, found = string.gsub(grp.alias(event.dst), 'T/S', 'FB') if grp.find(status) then         if value ~= grp.getvalue(status) then             os.sleep(0.5)               grp.write(event.dst, not value)              os.sleep(0.5)               grp.write(event.dst, value)           end    else   alert('Group address '..status ..' does not exist' )      end    end   
------------------------------
Ctrl+F5
Reply
#10
Works like a charm! Thank you very much! Smile
Reply


Forum Jump: