DALI

From Ethersex_Wiki
Jump to: navigation, search
DALI
Status
Stable
menuconfig Protocols->DALI light control
Pinning no
Ecmd yes
Depends on ECMD (optional)
Requires -
Code https://github.com/ethersex/ethersex/tree/master/protocols/dali

DALI light control provides the software layer to control DALI enabled digital ballast and transformers. DALI is an abbreviation for Digital Addressable Lighting Interface

DALI bus physical layer

  • one master (Ethersex) and up to 64 lights (targets) on one bus
  • 2 wire, no complex topology restrictions, no termination
  • targets may only answer on master's request
  • bus is isolated, but not SELV -> should be galvanic isolated on master's side
  • 1200 baud, manchester-encoding
  • 22.5VDC to 9.5VDC (16VDC nominally) is high level
  • 6.5VDC to -6.5VDV (0VDC nominally) is low level
  • bus is powered and held to high level by master
  • targets (slaves) short the bus to transmit a low value
  • master has to limit the current to 250mA

ECMD commands

Command Syntax Short description
dali raw <byte1> <byte2> Sends a raw frame with 2 hex bytes. If you know what you are doing...
dali dim <target> <level> Dims the specified target to the specified dim-level (0-254)
dali cmd <target> <command> [!] [?] Sends a command (decimal) to the target. For a list of commands see the NXP application note or the DALI standard. To automatically repeat the command add a ! to the end of the command (necessary with some commands). A ? at the end means that command waits for an answer from the target. This answer is being returned as a decimal value. Not all commands will send an answer.
dali scmd <command> [!] [?] Sends a special command to all connected targets (decimal 256-287). For a list of commands see the NXP application note or the DALI standard. A ? at the end means that command waits for an answer from the target. This answer is being returned as a decimal value. Not all commands will send an answer.

Values for the <target> parameter:

Targetcode Description
all All / Broadcast
snn short address 0-63 (decimal)
gnn group address 0-16 (decimal)

Examples

Example ECMD
Dim all targets to 100% dali dim all 254
Target 12 off dali dim s12 0
Targets in group 3 to 50% dali dim g3 127
Set dim-speed on all targets to approx. 5.6 seconds (t=1/2*SQRT(2^x), x=1-15) dali scmd 257 7

dali cmd all 46 !

Get actual dim value from target 4 dali cmd s4 160 ? Reply: 180
Is a target with short address 8 existing? dali cmd s8 145 ? Reply: 255 (means true)
Malfunction at target 8? dali cmd s8 146 ? Reply: READ TIMEOUT (No answer means no malfunction)
Program the single connected target the short address 3 dali scmd 257 3

dali cmd all 128 !

External sources

If you are lucky, you can find the official DALI standard document IEC 60929 on google.