Hi Filip, hi all,
one more question, if allowed
Is it possible to use DELAY or TIMER commands from the logic module? I want to create a timer based callback, and DELAY or TIMER commands would be really helpful instead of programming a timer by myself.
Something like
use abc = "TIMER.room.5s.C.LOGIC"
abc.value = "mycallback(parameter)"
If yes, do you have some sample code? I tried some variations of above, but no success
Any other options?
Have a nice evening,
Best regards,
Thomas
Willkommen auf unserer neuen Forenplattform für das Bus-Profi Forum
Neue Felder für die persönlichen Daten
Man kann jetzt seine öffentlich einsehbare Daten genau bestimmen. Details findet ihr in in diesem Beitrag.
Durch die neue Forensoftware und die Portierung der Daten konnten die Passwörter aus dem alten Forum nicht übernommen werden, bitte lassen Sie sich ein neues Passwort über die Passwort vergessen Funktion zusenden. Sollte es zu Problemen kommen kontaktieren Sie das Bus-Profi Team per E-Mail.
Neue Felder für die persönlichen Daten
Man kann jetzt seine öffentlich einsehbare Daten genau bestimmen. Details findet ihr in in diesem Beitrag.
Durch die neue Forensoftware und die Portierung der Daten konnten die Passwörter aus dem alten Forum nicht übernommen werden, bitte lassen Sie sich ein neues Passwort über die Passwort vergessen Funktion zusenden. Sollte es zu Problemen kommen kontaktieren Sie das Bus-Profi Team per E-Mail.
timers / delay from logic
#2 RE: timers / delay from logic
You could use timers like below:
Code: Alles auswählen
function handler(test)
print("This is delayed " .. test)
end
command("TIMER.test.5.C.LOGIC=handler('Hello')")
#3 RE: timers / delay from logic
That is an elegant solution, just what I was expecting, thanks a lot. And especially thanks for the super fast reply!
Best regards,
Thomas
Best regards,
Thomas
#4 RE: timers / delay from logic
Sorry, I just found one reason why that will not work. :blush:
Next version of the system will have it fixed. As for now command call is adding C. in front.
As a workaround until it's fixed you can add following line to the Events tab:
This will forward any data sent to C.TIMER.xxx=yyy as TIMER.xxx=yyy. You can try the same approach with delays.
Next version of the system will have it fixed. As for now command call is adding C. in front.
As a workaround until it's fixed you can add following line to the Events tab:
Code: Alles auswählen
Channel: C%.TIMER%.(.+)
Command:
Channel name: TIMER.$C1
Channel value: $D0
This will forward any data sent to C.TIMER.xxx=yyy as TIMER.xxx=yyy. You can try the same approach with delays.
Zurück zu „Domiq-Module - DOMIQ Sp. z o.o.“
Wer ist online?
Mitglieder in diesem Forum: 0 Mitglieder und 11 Gäste