Posts: 232
Threads: 57
Joined: May 2018
Reputation:
3
Hello.
Since the code below floods my KNX bus, i want to have a delay between each loop. The os.sleep in the code below does not work. Can anyone explaine how i can delay this loop?
while Variable1 == true
do
Variable2 :write(true)
os.sleep (10)
end
BR
Kai-Roger
Posts: 4
Threads: 0
Joined: Jan 2021
Reputation:
0
Use sleep(1) with no space between sleep and ().
Sent from my IN2023 using Tapatalk
Posts: 4
Threads: 0
Joined: Jan 2021
Reputation:
0
What's triggering the script?
All event scripts can run in parallel as many times as they are triggered.
Also it's not os.sleep() just sleep()
Sent from my IN2023 using Tapatalk
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
You probably have several instances of the same event script running. Please post the whole script code.
Posts: 232
Threads: 57
Joined: May 2018
Reputation:
3
Is there a difference between os.sleep and sleep? I see os.sleep is used by Erwin in the forum.
BR
Kai-Roger
Posts: 4
Threads: 0
Joined: Jan 2021
Reputation:
0
I doubt it, probably just aliases.
Tested them now, they seem to work the same way.
Sent from my IN2023 using Tapatalk