LogicMachine Forum
DMX Speed - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: DMX Speed (/showthread.php?tid=3854)



DMX Speed - DGrandes - 04.02.2022

Hi,

I´m working with DMX lighting of a bridge and I have some problems with the final solution.

They want to do some animations with lights and speedo of DMX not work fine, I don´t know if the problem is Logic Machine Script or DMX lights.

An example:

I have 52 RGBW lights and I want to write  a color individually in each light. 


Code:
for i = 1, 52, 1 do     grp.update(dir[i], color)     os.sleep(time) end

It i put 1 in time, it work perfectly, but with 500ms, it write in 2 lights at once,with 250ms, it write in 4 lights at once.... 
I think there is a limitation in the communication of 1 second.

Default params:
Code:
local defaults = {   -- storage key   skey = 'dmx_line_1',   -- RS-485 port   port = '/dev/RS485-2',   -- number of calls per second   resolution = 20,    -- default 20   -- total number of channels to use   channels = 256,   -- transition time in seconds, does not include DMX transfer time   transition = 1, }

I tried to change resolution in params to 200 but doesn´t work, it works worse.

Any ideas?

Thanks!


RE: DMX Speed - admin - 04.02.2022

The library reads values once a second. If you want some custom animation you should use the DMX library directly without using groups in between.


RE: DMX Speed - Punchito - 13.11.2023

(04.02.2022, 10:14)admin Wrote: The library reads values once a second. If you want some custom animation you should use the DMX library directly without using groups in between.
 
Could you give an example?


RE: DMX Speed - Daniel - 13.11.2023

https://openrb.com/example-dmx-lighting-control-with-lm2/


RE: DMX Speed - Punchito - 14.11.2023

(13.11.2023, 15:48)Daniel Wrote: https://openrb.com/example-dmx-lighting-control-with-lm2/

In this example, changes occur once per second, I need it faster.
How can I implement this?


RE: DMX Speed - admin - 14.11.2023

You need to use low-level library functions. Resident script example for 2 channels:
Code:
dmx = require('luadmx').open('/dev/RS485-1') dmx:setcount(2) function send(val)   dmx:setchannel(1, val)   dmx:setchannel(2, 255 - val)   dmx:send()   os.sleep(0.1) end while true do   for val = 0, 255, 5 do     send(val)   end   for val = 250, 5, -5 do     send(val)   end end