Introduction
IEC 62386-208 describes DALI control gears with switching function.
DALI control gears with switching function have a digital output (e.g. a relay). The digital output is switched via the DALI commands for changing the output value (DAPC, OFF, RECALL MIN LEVEL, RECALL MAX LEVEL, UP, DOWN, STEP UP, STEP DOWN, ...). These DALI commands do not directly change the actualLevel variable, but a virtual output value.
Four different threshold values are used to determine at which value of the virtual output value the digital output is set or reset.
If the digital output is active (TRUE), actualLevel = 254. If this is inactive (FALSE), actualLevel = 0. The value of the virtual output value cannot be queried.
The reset values of the variables are set so that setting the virtual output value to 0 resets the digital output and a value of 1...254 sets the digital output. The value 255 (MASK) has no effect on the digital output.
Threshold values
A total of four threshold values are available. Two threshold values (upSwitchOnLevel and upSwitchOffLevel) define the switching points at an increasing virtual output value. While the other two threshold values (downSwitchOnLevel and downSwitchOffLevel) determine when the output switches on a falling virtual output value. If a threshold value is not to have a function, it is set to 255 (MASK).
In most applications, it is not practical to use all four threshold values.
The following example shows how the digital output value behaves when the threshold values downSwitchOffLevel and upSwitchOnLevel are used. The two threshold values downSwitchOnLevel and upSwitchOffLevel have the value 255 (MASK) and are therefore without function.

The control direction can also be reversed by using the threshold values downSwitchOnLevel and upSwitchOffLevel. In this case, downSwitchOffLevel and upSwitchOnLevel are disabled.

Note that the value of minLevel according to IEC 62386-208 is 254, which is the same as maxLevel. This means that the virtual output value can only assume the values 0 and 254. Depending on the threshold value, it may also be necessary to adjust minLevel.