Area= Command
Area= lets you set the default area used by functions within a task so you can send several messages all to the same area.
This change is only for the task it is in and lasts until the next time you change the default area value.
It affects the functions Preset() ChannelLevel(), ResetPreset(), Panic(), UnPanic(), and PresetOffset().
Using the Area= command to change the default area of functions saves some typing but the main benefit is allowing you edit the area parameter in multiple functions from a single location.
Syntax
Area=x Where x is the number of the area.
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 area parameter if left blank is area 1 until changed by this command.
Can be any value from zero to 255.
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. |
Examples
Example 1
Will set all Commands that require an Area number to use Area 3 unless explicitly defined in the function call. Will send the following when called “Preset 2-Area 3” then “Preset 3-Area 9” then “Delay for 1 second” then “Preset 5-Area 3”
Task1()
{
Area=3 //Set Default Area to 3
Preset(P=2) //Recall Preset 2 for Area 3
Preset(P=3,A=9) //Recall Preset 3 for Area 9, uses the specified area instead of default
Delay(1)
Preset(P=5) //Recall Preset 5 for Area 3
}
Example 2
Sends all presets to the same default area for an RGB Chase.
Task1()
{
Area=11 //Set Default Area to 11 (RGB Lights)
Delay=1.5 //Set Default Delay time to 1.5s
Fade=1 //Set Default Fade time to 1s
Loop:
Preset(P=5) //Recall Preset 5 (Red)
Delay() //Delay between colors
Preset(P=6) //Recall Preset 6 (Yellow)
Delay()
Preset(P=7) //Recall Preset 7 (Green)
Delay()
Preset(P=8) //Recall Preset 8 (Teal)
Delay()
Preset(P=9) //Recall Preset 9 (Blue)
Delay()
Preset(P=10) //Recall Preset 10 (Magenta)
Delay()
BRA Loop //Loop back to the top and repeat.
}