DALI_TO_PERCENT

Conversion of the output value of a DALI control gear from 0...254 to 0...100 %.
The conversion is logarithmic, as described in IEC 62386. A special feature is the output value 255 (MASK). If the value 255 (MASK) is passed to the function, the value 255.0 is returned.
The following table shows some example values:
nDALI | Return value |
---|---|
0 | 0.0 % |
1 | 0.100 % |
10 | 0.128 % |
85 | 0.991 % |
100 | 1.492 % |
128 | 3.206 % |
150 | 5.845 % |
200 | 22.892 % |
254 | 100 % |
255 (MASK) | 255.0 |
Inputs
VAR_INPUT
nDALI : BYTE;
END_VAR
Name | Type | Description |
---|---|---|
nDALI | BYTE | Output value for the DALI control gear (0…254). |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.32 | Tc3_DALI from v3.12.0.0 |