EasyManua.ls Logo

Embedded Systems LogiMachine5 Power - Page 203

Embedded Systems LogiMachine5 Power
254 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
203
-- get new value
new = math.min(100, val + step)
new = math.max(0, new)
-- no change, stop
if new == val then
return
end
-- write new value
val = new
grp.write(out, new, dt.scale)
-- wait for next run
os.sleep(delay)
end
end
2) Create 3 objects:
1/1/1 - binary (dim up)
1/1/2 - binary (dim down)
1/1/3 - 1-byte scale (output)
3) Create an event script for each binary object:
bindimmer('1/1/1', '1/1/2', '1/1/3', event)
4) You can tune step and delay variables in bindimmer function to adjust dimming
speed.
DALI commands
Description
Addressable
Reply
Value
direct arc power control
+
0..254
turn off
+
turn on
+
down
+
step up
+
step down
+
recall max level
+
recall min level
+
step down and off
+

Table of Contents