EasyManuals Logo

Embedded Systems LogiMachine5 Power User Manual

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
Page #202 background imageLoading...
Page #202 background image
202
1) Add bindimmer function to Common functions
function bindimmer(up, down, out, event)
local main, rev, step, val, new, delay
step = 10 -- in %
delay = 0.5 -- in seconds
-- ignore "stop" command
val = tonumber(event.datahex, 16)
if val == 0 then
return
end
-- up, normal mode
if event.dst == up then
main, rev = up, down
-- down, reverse step
elseif event.dst == down then
main, rev = down, up
step = -step
-- invalid object
else
return
end
-- current output object value
val = grp.getvalue(out) or 0
while true do
-- main object in "stop" state
if not grp.getvalue(main) then
return
end
-- reverse object in "start" state
if grp.getvalue(rev) then
return
end

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Embedded Systems LogiMachine5 Power and is the answer not in the manual?

Embedded Systems LogiMachine5 Power Specifications

General IconGeneral
BrandEmbedded Systems
ModelLogiMachine5 Power
CategoryController
LanguageEnglish