Using a Button with daemon.g
-
I want to use a Button to Switch an Output
(Button pressed (IO7.in) -> Output (Out7) on)
(Button released: Output off)I‘m not Sure if daemon.g is capable of.. let‘s say
a 100ms Cycletime (reliable), without bursting to
Much Energy of the Atmel Chip.
1 Second is way to slow for the goal to
switch a laser on/off,
And i hate to do that with the Touchscreen.. -
-
daemon.g runs once every 10 seconds - I doubt that would work for you.
Perhaps this will help:
Frederick
-
@neueklasse use a loop using while. That will allow daemon.g to run constantly
-
Thanks, i don't had in mind that Duet has this Function, it works as expected!
I never read about Loops faster than 1 second in RRF, what is the maximum possible?
i suppose a while loop without a G4 Command inside can crash the Software?
it's also not easy to Edit the daemon.g file.. only after having the .part file that'll
be created after you try to edit the daemon.g file...
maybe it's possible to STOP the daemon.g file from Running to edit it? maybe with a M-Command?
for example the KUKA Roboters use a similar thing, called a "sps.sub" (submitinterpreter)
and it is possible to Stop it separately... -
@neueklasse actually, why not just use a trigger?
Why does it have to be daemon.g? -
@neueklasse I ran into the same problem about daemon.g being a pain to edit when a 'while true' statement was used. Instead of using a 'true' statement I made this a variable I called 'daemonRun' that I set to 1 in the config. When I want to edit daemon.g I first set it to 0 and then change daemon.g and reset it back to one.