Preset= Command
Preset= lets you set the default preset used by the Preset() function within a task so you can send several messages to different areas all with the same preset.
This change is only for the task it is in and lasts until the next time you change the default preset value.
Using the Preset= command to change the default preset of functions saves some typing but the main benefit is allowing you edit the preset parameter in multiple functions from a single location.
Syntax
Preset=x Where x is the number of the preset.
Can be set more than once within the task, i.e. can be set for the first 6 messages and then set for the next 6 messages in a 12 message task.
The default preset parameter if left blank is 1 until changed by this command.
Can be any value from 1 to 2048.
The task editor in System Builder has a bug and will apply any default modification commands that are skipped over by a BRA command. Essentially only the last default modification will apply. |
Example
Turns off the lights in a house.
{
Fade=2 //Set default fade time to 2 seconds for dimmable zones
Preset=4 //Set default preset to 4 (Off)
Delay=.2 //Set a default delay of 200ms
Preset(A=4) //Turn off the living room lights
Delay()
Preset(A=9) //Turn off the dining room lights
Delay()
Preset(A=5) //Turn off the kitchen lights
Delay()
Preset(A=11) //Turn off the bedroom lights
Delay()
Fade=0 //Set default fade time to 0 seconds for switched zones
Preset(A=22) //Turn off the Garage
Delay()
Preset(A=3) //Turn off the Exterior lights
Delay()
Preset(A=14) //Turn off the Fountain pump
Delay()
Preset(A=8) //Turn off the Closet light
Delay()
Preset(A=100,P=1) //Power security light, doesn't use default preset
}