01.06.2020, 06:31 (This post was last modified: 01.06.2020, 06:34 by phongvucba.)
Hi everyone! I have dim DALI problem on LM. Do you have a solution to help me? It is turned off quickly or turned on quickly, annoying customers
I want dim from 0% to 100% or from 100% to 0% to have a period. For example it will take 5s to complete the event,. In the settings section there is no time.
Thank so much!
You can change fade time of ballasts via a script. Fade time setting 6 is approximately 4 seconds, the larger the value the longer the fade time.
Run this once (assuming you are using internal gateway):
02.06.2020, 03:55 (This post was last modified: 02.06.2020, 06:17 by phongvucba.)
Thank so much , everyone ! Admin !
I have seen it work well! But I do not understand where it will store this information? . But there is something I do not understand, when I do this, my on / off address 11/1/1 it also works dim, I do not want that, I only need 11/1/3 dimmer address. Can it change you?
And I also want to Get the entire state of the light, and bring it up to update. I have tried but it's failed? Help me please.
--------------------------------
require('user.dali')
res, err = dalicmd('internal', 'querystatus', { addrtype = 'broadcast' })
if res then
log(res:byte())
else
log(err)
end
---------------------------
You can try using a script instead of object mapping for binary light control. This event script must be mapped to a binary object. It will control ballast with short address 1.
As for status you cannot use broadcast if you have more than 1 ballast. All ballasts will reply to broadcast query which will result in a collision error. Use short address mode for queries:
thank Admin !
I do not quite understand! For example, my dimmer is 11/1/3, I want to receive status at 11/1/103. How do I add the code? I really thank you, I'm new.
03.06.2020, 03:32 (This post was last modified: 03.06.2020, 03:35 by phongvucba.)
I try! but...
Everyone let me ask! Why is my value not returning as current value? 11/1/3 other than 11/1/103 (status). 11/1/4 other than 11/1/104 (status). 30% and 51%, but it's 4% and 4%. Please help me!
-------------
require('user.dali')
res, err = dalicmd('internal', 'querystatus', { addrtype = 'short', address = 0 })
if res then
grp.checkupdate('11/1/103', res:byte())
end
res, err = dalicmd('internal', 'querystatus', { addrtype = 'short', address = 1 })
if res then
grp.checkupdate('11/1/104', res:byte())
end
You need to use queryactual instead of querystatus command.
Try this script:
Code:
require('user.dali')
function queryactual(short, addr)
local res, err = dalicmd('internal', 'queryactual', { addrtype = 'short', address = short })
if res then
local val = res:byte()
if val > 0 then
val = math.floor(val / 2.54 + 0.5)
val = math.max(1, val)
end
grp.checkupdate(addr, val)
end
end
14.11.2020, 07:17 (This post was last modified: 14.11.2020, 07:18 by phongvucba.)
Hi every one !
I am using version 20200720, but the Delay dim or get the status functions are not working? Is it faulty ?, my old version runs ok!
------Delay dim----
require('user.dali')
dalicmd('internal', 'setdtr', { addrtype = 'broadcast' ,value = 7 })--Lưu giá trị 7 vào thanh ghi DTR
dalicmd('internal', 'storefadetime', { addrtype = 'broadcast' })--Lấy giá trị 7 đó ở thanh ghi để cho vào thời gian dimmer
----------update status for addr------
require('user.dali')
function queryactual(short, addr)
local res, err = dalicmd('internal', 'queryactual', { addrtype = 'short', address = short })
if res then
local val = res:byte()
if val > 0 then
val = math.floor(val / 2.54 + 0.5)
val = math.max(1, val)
end
grp.checkupdate(addr, val)
end
end
queryactual(0, '2/7/101')
------------------------------
Please help me!
14.11.2020, 09:15 (This post was last modified: 14.11.2020, 09:15 by phongvucba.)
Thanks Admin! It works again. But there's one more thing I have a problem with.
When I scan the ballasts Dim Dali I can't scan all, sometimes it only accepts 2, sometimes it accepts 5 . I do not understand why?
Thank so much everyone! <3
(14.11.2020, 08:05)admin Wrote: Try deleting user.dali library from Scripting - User libraries. Reboot after deleting and new version of the same library will appear.
(16.11.2020, 08:40)Daniel. Wrote: This sound like power/cabling issue on DALI
Thank Daniel !
do you mean the source DALI bus is not enough?
I gave it DLP-04R (level gain 0.24A = 240mA) per channel of LM5.
Could it be one more reason?
04.01.2021, 09:59 (This post was last modified: 04.01.2021, 10:02 by davidchispas.)
(03.06.2020, 06:11)admin Wrote: You need to use queryactual instead of querystatus command.
Try this script:
Code:
require('user.dali')
function queryactual(short, addr)
local res, err = dalicmd('internal', 'queryactual', { addrtype = 'short', address = short })
if res then
local val = res:byte()
if val > 0 then
val = math.floor(val / 2.54 + 0.5)
val = math.max(1, val)
end
grp.checkupdate(addr, val)
end
end
I need your opinion on how it is advisable to obtain the status of the ballasts in group.
For example, a group of 60 ballasts linked to the same control object. To visualize the real state I need to obtain at least the state of one of them, but in the event that in the future that ballast fails, could I assign the same address to the 60 ballasts?
To visualize the On / Off status, I added another line to the script, is that fine, or is it recommended to do it in another way?
Code:
require('user.dali')
function queryactual(short, addr)
local res, err = dalicmd('internal', 'queryactual', { addrtype = 'short', address = short })
if res then
local val = res:byte()
if val > 0 then
val = math.floor(val / 2.54 + 0.5)
val = math.max(1, val)
end
grp.checkupdate(addr, val)
end
end