UIText() - Dynamic Text Update Command
This function will update the text on a UI button on the PDTS touchscreen.
You specify the button ID and the text you wish to appear on it.
Syntax
UIText(ButtonId=x,TextMessage="t")
-
ButtonID is the index number of the button or text field. This is found on the - Default of 1
-
"P" is the preset number (0-2048) - Default of 1
-
"F" is the fade time in seconds (0-1310)- Default is 0.2 seconds
-
"J" is the join level (0x00-0xFF) - Default is 0xFF
-
"B" is the preset bank (1-256) - Default is 1 (presets 1-8)
Any parameter that is omitted will be replaced with the default value.
You can only use fixed values, decimal or hex, in functions. You may not reference memory locations or ports. However, you can use constants as they are just place holders for fixed values.
You can use the commands Preset= Command, Area= Command, Fade= Command, Bank= Command, and Join= Command to modify the default value for parameters in this function when you do not specify them. |
Examples
Example 1
Simple standard use of the Preset() function. Join and Bank are omitted so the default values are used.
{
Preset(A=4,P=2,F=2) //Recall preset 2 for area 4 with a fade of 2s.
}
Example 2
Turns off the lights in a house. Note how it uses commands to modify the default fade time and preset number.
{
Fade=2 //Set default fade time to 2 seconds for dimmable zones
Preset=4 //Set default preset to 4 (Off)
Delay=.1 //Set a default delay of 100ms
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
}