Delay() Command
Delay() Causes the execution of the task to pause for a specified time.
The max value is 1200s (20min) but multiple Delay() messages can be chained together to create even longer delays.
Dynalite devices are single threaded so they only process one command at a time. The Delay() command introduces a yield allowing other tasks to process things. |
This command uses the timing in the microprocessor and can vary slightly based on power fluctuations. As a result the accuracy of the delay degrades the longer the delay. |
Syntax
Delay(x) where x is any value from 0.02-1200.
The default value is 1s if not specified but you can modify the default with the Delay= Command command.
Always put a delay of at least 100ms between your DyNet message to avoid overloading the network or the message buffer of devices. |
Example
Will send the following when called “Preset 2-Area 3” then “Delay for 3.5 seconds” then “Preset 3-Area 9” then “Delay for 1 second” then “Preset 5-Area 3” then “Delay for 3.5 seconds” then “Preset 3-Area 9”
{
Delay=3.5 //Set default delay to 3.5s
Preset(P=2,A=3)
Delay() //Delay for default time
Preset(P=3,A=9)
Delay(1) //Delay for specified time of 1s
Preset(P=5,A=3)
Delay() //Delay for default time
Preset(P=3,A=9)
}