LogicMachine Forum
setdimmingcurve?? - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: CANx (https://forum.logicmachine.net/forumdisplay.php?fid=23)
+--- Thread: setdimmingcurve?? (/showthread.php?tid=6462)



setdimmingcurve?? - jcruz10 - 10.06.2026

Hello everyone,

I have been reviewing the CANx-DALI Lua documentation and noticed that the query command `querydimmingcurve` is available.
Is there any way to modify this value from Lua? More specifically, is there a method to change the DALI "dimming curve" setting (linear/logarithmic) using the CANx-DALI Lua API?
I can read the current value using `querydimmingcurve`, but I have not found any corresponding command to write or configure it.
Is this functionality supported, or is it only possible through an external DALI commissioning tool?

Thanks in advance.


RE: setdimmingcurve?? - admin - 11.06.2026

First you need to update CANx-DALI app: https://dl.openrb.com/pkg/canxdali-20260611.ipk

Installation: on the main apps screen click the + icon when logged in as admin. Click the menu in the top left and select "Install from file". Enable "Allow to install package without signature" option.

Then use this script to set dimming curve to linear on gateway 0.1 short address 0.
Code:
canxdali = require('applibs.canxdali') canxdali.sendcmds({   lineid = 0,   nodeid = 1,   cmds = {     { cmd = 'setdtr0', value = 1 }, -- 0 = logarithmic, 1 = linear     { cmd = 'enabledevicetype', value = 5 },     { cmd = 'selectdimmingcurve', address = 's0' },   } })



RE: setdimmingcurve?? - jcruz10 - 11.06.2026

Dear Admin,
First of all, thank you very much for your assistance and for providing the updated version of the 'applibs.canxdali' library. I have spent some time analyzing the DALI bus traffic with DALI Monitor and would like to share my findings, as I believe I may have identified an issue related to the dimming curve configuration on DT6 LED drivers.
After comparing the command sequence generated by the library with the sequence that successfully configures the ballast, I noticed the following discrepancy:
1. Observed Behavior
According to the DALI standard, when changing the dimming curve on a DT6 device, the application extended command 227 (E3) should be sent after ENABLE DEVICE TYPE 6 (C106).
However, when using:
Code:
{ cmd = 'selectdimmingcurve', address = 's0' }
the library appears to send 01E5 (command 229) instead of 01E3 (command 227).
2. Impact
From the traces I captured, command 229 (E5) seems to be associated with Device Type 5. When a standard DT6 LED driver receives this command, it reports it as an undefined DT255 command and ignores the request. As a result, the dimming curve remains unchanged.
I also noticed that the library internally issues an ENABLE DEVICE TYPE 5 (C105) command, which may explain the behavior.
3. Expected Sequence
For a DT6 ballast at short address 0, I would expect the following sequence:
  1. DTR0 = 1 → A301
  2. ENABLE DEVICE TYPE 6 → C106
  3. SELECT DIMMING CURVE → 01E3
  4. SELECT DIMMING CURVE → 01E3 (second transmission)
  5. TERMINATE → A100
Based on these observations, could you please verify whether the internal mapping of
Code:
selectdimmingcurve
should use command 227 (E3) when operating with DT6 devices instead of command 229 (E5)?
Of course, it is also possible that I am overlooking some implementation detail, so I would appreciate any clarification you can provide.
Thank you again for your support and for taking the time to review this. I look forward to your feedback.
Best regards,

The first image shows the correct sequence sent by Tridonic's MasterConfigurator software; the second image shows the sequence sent by the example provided after a firmware update.

`
canxdali = require('applibs.canxdali')

canxdali.sendcmds({
lineid = 0,
nodeid = 1,
cmds = {
{ cmd = 'setdtr0', value = 1 }, -- 0 = logarithmic, 1 = linear
{ cmd = 'enabledevicetype', value = 5 },
{ cmd = 'selectdimmingcurve', address = 's0' },
{ cmd = 'selectdimmingcurve', address = 's0' },
{ cmd = 'terminate' }
}
})
`


RE: setdimmingcurve?? - admin - 12.06.2026

Updated app: https://dl.openrb.com/pkg/canxdali-20260612.ipk

The previous app version only implemented "select dimming curve" command for DT5 devices. Since the DT6 "select dimming curve" command number is different from DT5 the command names have been changed to selectdimmingcurvedt6 and selectdimmingcurvedt5.

Use this script for DT6. You don't have to send "select dimming curve" twice, it is done automatically.
Code:
canxdali.sendcmds({   lineid = 0,   nodeid = 1,   cmds = {     { cmd = 'setdtr0', value = 1 }, -- 0 = logarithmic, 1 = linear     { cmd = 'enabledevicetype', value = 6 },     { cmd = 'selectdimmingcurvedt6', address = 's0' },   } })



RE: setdimmingcurve?? - jcruz10 - 12.06.2026

Dear Admin,
I would like to sincerely thank you for your support and for implementing the fix.
I have tested the updated library and everything is now working perfectly. The dimming curve can be changed correctly, and the generated DALI commands match the expected DT6 sequence.
I truly appreciate the responsiveness and willingness to investigate the issue in detail. It has been a pleasure working with such a helpful support team.
Thank you again for the excellent assistance.
Best regards,