This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Delay for DALI !
#1
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!

Attached Files Image(s)
   
Reply
#2
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):
Code:
require('user.dali')

dalicmd('internal', 'setdtr', { addrtype = 'broadcast', value = 6 })
dalicmd('internal', 'storefadetime', { addrtype = 'broadcast' })

I also suggest looking into our CANx-DALI gateway which provides a lot more features than the internal or old RS-485 gateways.
Reply
#3
Thank so much , everyone ! Admin !
I have seen it work well! But I do not understand where it will store this information? Smile. 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? Smile
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. Sad
--------------------------------
require('user.dali')
res, err = dalicmd('internal', 'querystatus', { addrtype = 'broadcast' })
if res then
log(res:byte())
else
log(err)
end
---------------------------
Reply
#4
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.
Code:
require('user.dali')
cmd = event.getvalue() and 'recallmax' or 'off'
res, err = dalicmd('internal', cmd, { addrtype = '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:
Code:
res, err = dalicmd('internal', 'querystatus', { addrtype = 'short', address = 0 })
Reply
#5
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. Sad
Reply
#6
Use a resident script with 5-10 seconds of sleep time.
Code:
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
Reply
#7
I love you every one ! Smile
Thank so much !
Reply
#8
I try! but...Sad
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

Attached Files Image(s)
   
Reply
#9
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

queryactual(0, '11/1/103')
queryactual(1, '11/1/104')
Reply


Forum Jump: