1
\$\begingroup\$

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 Terminate-Initialise before this process but it didn't work either. Am I misunderstanding the DTR commands?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ Did you mean this when we are sending CMD163 to add something to DTR? I couldn't see anything related to this. Anyway, I tried sending 0xA305 then 0x8180 to set the address to 02 as you said. Then tried turning the lamp on using 0x0400 but it didn't work either. I can not get any response to Query Short Address or Query DTR Content \$\endgroup\$ Commented Apr 10, 2020 at 12:33
  • 1
    \$\begingroup\$ Not command 163, that is QUERY POWER ON LEVEL. DTR is set with Command 128. 0x8180 is SET DTR AS SHORT ADDRESS sent to Group 0. Unless you already have set up gear to be in Group 0, this will not do anything, you probably mean 0xFF80 which is the broadcast addressed version. 0x0400 is DAPC Short addr 2, level 0 which is off. \$\endgroup\$
    – Martin
    Commented Apr 10, 2020 at 13:52
  • \$\begingroup\$ Thanks Martin, the problem was about broadcasting. I used 0xA305, then 0xFF80 and it worked. I can toggle led using 0x0400 and 0x04FE. \$\endgroup\$ Commented Apr 13, 2020 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.