Channel= Command
Channel= lets you set the default logical channel number used by the ChannelLevel() function within a task so you can send several messages all to the same channel number.
This change is only for the task it is in, and lasts until the next time you change the default area value.
Using the Channel= command to change the default channel number of functions saves some typing but the main benefit is allowing you edit the channel parameter in multiple functions from a single location.
Syntax
Channel=x Where x is the number of the channel.
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 channel parameter if left blank is channel 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 channel number to use channel 3 unless explicitly defined in the function call. Will send the following when called: 100% for channel 3 in areas 3 and 4, then delay 1 second and recall 0% for channel 3 of both areas. Finally, set Area 5, Channel 2, to 20%. It ignores the default because a channel number has been specified.
Task1()
{
Channel=3 //Set Default channel to 3
ChannelLevel(A=3,L=100) //Recall 100% for Area 3, Channel 3
Delay(.1)
ChannelLevel(A=4,L=100) //Recall 100% for Area 4, Channel 3
Delay(1)
ChannelLevel(A=3,L=0) //Recall 0% for Area 3, Channel 3
Delay(.1)
ChannelLevel(A=4,L=0) //Recall 0% for Area 4, Channel 3
Delay(.1)
ChannelLevel(A=5,C=2,L=20)//Recall 20% for Area 5, Channel 2
}
Example 2
Blink a lighting zone on and off using a default channel.
Task1()
{
Area=11 //Set Default Area to 11
Channel=2 //Set Default Channel to 2
Delay=1.5 //Set Default Delay time to 1.5s
Fade=1 //Set Default Fade time to 1s
Loop:
ChannelLevel(L=100) //Set zone to 100%
Delay() //Delay between colors
ChannelLevel(L=0) //Set zone to 0%
Delay()
BRA Loop //Loop back to the top and repeat.
}