Electronic – Dali Commissioning Without Randomise

dali

I have 2 slave devices connected to my dali bus. I can set their short address using the below steps:

  1. Terminate
  2. Initialise
  3. Randomise
  4. Set B1, B3 and B5 search addresses
  5. Compare
  6. Go back to step4 until there is only one luminaire
  7. Program the short address
  8. Withdraw
  9. Go back to step4 until there is no luminaire left

Q1. When there is only one slave device in the dali bus, I can assign short addresses using above steps, one by one. But when there are 2 slave devices in the dali bus, I can only assign short address to one of them, the next luminaire does not respond to compare commands. Is there any chance it might be related to an electrical issue?

Q2. As I understood, if we have only one slave device in the dali bus, we can assign it a short address without using randomise. I'm following the below steps to achieve this:

  1. Broadcast A3 command with the desired address. e.g. for the short address of 05, send: 0xA305

  2. Broadcast CMD128 to make the luminaire use 05 as the short address, send: 0x8180

But I couldn't set short address using this method. I also tried TerminateInitialise before this process but it didn't work either. Am I misunderstanding the DTR commands?

Best Answer

When using DTR to program a short address, there is a special format. The value needs to be left shifted one place and then the least significant bit set. Command 128 (opcode byte 0x80) STORE DTR AS SHORT ADDRESS gives the bitwise structure of the DTR for this as 0AAA AAA1 where the A bits are bits of the short address, or to clear the short address, use MASK (all bits 1).

In C, this would be written

DTR = (addr << 1) | 0x01;

This is equivalent to multiplying the address by two then adding one. So working backwards from your case of DTR = 0x05, addr is 2.

The DTR is set by sending command 257 (address byte 0xA3). All control gears will set their DTR, this command is not addressed, but Command 128 STORE DTR AS SHORT ADDRESS is addressed, and is a Configuration command so needs to be sent twice within 100ms.