Numbers
Numbers are variables which have a numeric value. An example might be a Number called Lounge Volume
which might have a numeric value between 0 and 100, representing
the percentage level of volume in a room.
Numbers have a range (minimum and maximum, eg 0 and 100) and default value when the app starts, unless they are global variables, or the settings option Remember Last Page / Settings
is applied, in which case the Number will have
the last known value.
Managing Numbers
Numbers can be created from the Numbers screen - which can be accessed from the Project Settings
tab.
Numbers are organised into groups (folders) just like flags.
Numbers have the following properties:
Minimum - The minimum permitted value of the variable. This can be a negative number. Any attempt to set the number equal to a value lower than this will result in the number being set to the minimum value.
Maximum - The maximum permitted value of the variable. This can be a negative number, but must be larger than the minimum. Any attempt to set the number equal to a value higher than this will result in the number being set to the maximum value.
Is Hex 00-FF - If set, the number is treated, for the purposes of inserting it in a command / label, as a 2 digit uppercase hexadecimal string. Eg if the number was called
Volume
and its value was set to 10, and then the following command was sent:
SET VOL=[Volume]
then it would be sent as:
SET VOL=0A
(10 decimal is 0A in hex)
Is Graphable - for centralised (ticked) Centro numbers, this determines whether the historical values of the number can be viewed via the Centro web interface graphing tool.
Processor Label ID - in the (uncommon) case of using multiple different projects with a Centro-8 / 8M, this ID ensures that numbers in one project are associated with numbers in another project.
Adding Numbers
To add a number, first select or create the folder that the number will reside in, and click Add Number
. Numbers must be given a unique name, you can edit the name by single clicking on the number in the tree view.
Creating Multiple Numbers
It is possible to select a number & duplicate several copies of it, and each copy will be named with an incrementing numerical value at the end.
Setting Number Values
You can set the value of a number with an action. Number can be set to a specific numeric value by typing in the Data
field, or one of the following, which can be selected from the drop down list:
[+] - increments the number by the value specified after the [+], eg
[+]10
would add 10 to the number value[-] - decrements the number by the value specified after the [-], eg
[-]10
would subtract 10 from the number value[/] - divides the number by the value specified after the [/], eg
[/]10
would divide the number value by 10, and return the integer result[*] - multiplies the number by the value specified after the [*], eg
[*]10
would multiply the number value by 10#CURRENTTIME - sets the number equal to the current time in the format HH:MM, eg "1305"
#CURRENTHOUR - sets the number equal to the current hour in the format HH eg "09"
#CURRENTMINUTE - sets the number equal to the current minute in the format MM eg "05"
#CURRENTSECOND - sets the number equal to the current second in the format SS eg "05"
#CURRENTDAYOFWEEK - sets the number equal to the day in number format eg "01"
#CURRENTDAY - sets the number equal to the day of the month eg "28"
#CURRENTMONTH - sets the number equal to the current month eg "01" for January
#CURRENTYEAR - sets the number equal to the current year eg "2017"
Inserting Number values
It is possible to use the value of a number variable using {NUMBERNAME} brackets. For example, you could create a command:
SET VOL={Volume}
would insert the current value of the variable called "Volume" into the command as text, eg, if the number value was "55" then the command would become:
SET VOL=55
You can also set the value of variables equal to other variables in a similar way using the Data
field, eg:
Set a label called "Command" equal to "VOLUME", and set a number variable called "Parameter" to "100", then set a label equal to:
SET [Command] {Parameter}
which would be equal to:
SET VOLUME 100
When using the value of variables with or { } (number) brackets you must ensure that the variable name is spelt exactly, case sensitive.
Using Numbers
Gauges
When using a Gauge page object, unless using a 3rd party driver, the only way for the gauge to interact with anything is by linking it with a number variable. This is done using the Gauge
menu option:
With the Gauge linked to a number variable, the gauge represents the range of the number variable, and changes to one will affect the other. For example, with a linked number variable which has a range of 0-500, setting the number variable to 0 will result in the gauge showing the 0% level, and setting the number to 250 will result in the gauge showing the 50% level.
Equally, if the user slides the gauge to the 100% value for example, the number variable will then change to 500.
Color Wheels
When using a color wheel object, you can associate the Red, Green and Blue values of the color wheel with 3 number variables, in a similar way to a gauge:
Button with X,Y tracking
It is possible to track the x and y co-ordinates of the touched position of a button, using the x,y menu shown. You can then use 2 number variables linked to the position:
This allows for dual purpose button controls, eg sliding your finger from left to right increases audio bass level, whilst simultaneously, sliding your finger from bottom to top increases audio treble levels etc.