PERCENT_TO_DALI

PERCENT_TO_DALI 1:

Conversion of the output value of a DALI control gear from 0...100 % to 0...254.

The conversion is logarithmic, as described in IEC 62386. A special feature is the output value 255 (MASK). If the value 255.0 is passed to the function, the value 255 (MASK) is returned.

The following table shows some example values:

fPercent

Return value

<= 0.0

0

0.100

1

0.128

10

0.991

85

1.492

100

3.206

128

5.845

150

22.892

200

100.0 <= fPercent < 255.0

254

>= 255.0

255 (MASK)

PERCENT_TO_DALI 2: Inputs

VAR_INPUT
  fPercent             : LREAL;
END_VAR

Name

Type

Description

fPercent

LREAL

Output value for the DALI control gear (0…100%).

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.32

Tc3_DALI from v3.12.0.0