08.07.2015, 07:09
Hi,
Is there an direct way to add visualize a pulse object. lets take an gate contact as an example, when a pulse ( 1 and then 0 ) is given on the object the gate will open or close. Typically with a light in the visu, the switch\button goes on, stays on and turns off when you press it again. With an pulse object it will go off about 0.5 from turning on.
I guess the only way this would be achieved is an event script on the pulse object. something like.
Thanks,
Roger
Is there an direct way to add visualize a pulse object. lets take an gate contact as an example, when a pulse ( 1 and then 0 ) is given on the object the gate will open or close. Typically with a light in the visu, the switch\button goes on, stays on and turns off when you press it again. With an pulse object it will go off about 0.5 from turning on.
I guess the only way this would be achieved is an event script on the pulse object. something like.
Code:
if event.type == 'groupwrite' then
obj = grp.find(event.dst)
if obj and obj.decoded then
if obj.value == true then
os.sleep(0.5)
grp.write(event.dst, false, obj.datatype)
end
end
end
Thanks,
Roger