^50 - The Area Port

This is a read/write port for the logical area number of a feature on a device.
For a load controller this will be the area assignment of each output. For sensors and UIs it will be things like motion control, light control, native area, and temperature area.

You can use this to dynamically change the area of all the buttons or switches that are still on the default area.

Syntax

LDA ^50,x //loads from the area value
STA ^50,x //writes to the area value
Where x is the proxy channel index of the thing you want the area of.

Some of the values will be from area cascading objects.
^50 Area subport mapping

SubPort

Load Controller

Sensor

UI

^50,0

Output 1

Motion Area

Native Area

^50,1

Output 2

Closed Loop Area

Proximity Sensor Area

^50,2

Output 3

Device Area

^50,3

Output 4

Open Loop Area

^50,4

Output 5

IR Area

Temperature Area

^50,5

Output 6

^50,6

Output 7

^50,7

Output 8

^50,8

Output 9

^50,9

Output 10

IR Temperature Area

^50,n

Output n-1

Examples

Example 1

This task changes the area of all default functions to an area set by the dipswitches.

Startup1()
{
    Name="Start Task"
    LDA ^59,0           //Get the dipswitch port
    STA ^50,0           //Store into the native area
    Null
}

Example 2

This task changes the area of an output.

{
    Name="Area updater"
    LDA ~12     //Load the new area
    STA ^50,5   //Store it as the new area for output 4.
    Null
}

Example 3

This task only runs if the logical area doesn’t match.

{
LDA ^50,0       //Load the native area
CMP #HVAC_AREA  //Is this device programmed for HVAC
BNE LightingOFF //If not go turn the lights off
Null            //If so end
...
}