How to make a loop of a Output_Pin ON and OFF?
-
@FBG you'll want to use a while loop in daemon.g
https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#loop
something likewhile state.status != "idle" M42 P0 S1 G4 S2 M42 P0 S0 G4 S10
edited to swap <> for !=
-
@jay_s_uk I try but....
Error: Failed to read code from macro daemon.g: Failed to evaluate "state.status <> idle": expected an expressionThis is my daemon file:
while state.status <> idle M42 P5 S1 G4 S2 M42 P5 S0 G4 S10
-
@FBG you missed the " around idle
-
-
@FBG also replace <> by !=
-
@dc42 said in How to make a loop of a Output_Pin ON and OFF?:
@FBG also replace <> by !=
Haha. Missed that! 🧑🦯 🤪
-
Thanks a lot!
Now is working properly!!
-
-
-
Sorry dears, not solved.
I was thinking that is working because don't show error but now say:Error: Failed to read code from macro daemon.g: empty while loop detected in line 2
My code is:
while state.status != "idle" M42 P5 S1 G4 S2 M42 P5 S0 G4 S10
-
@FBG You haven't indented the code
-
@FBG said Need to indent the code
My code is:
while state.status != "idle" M42 P5 S1 G4 S2 M42 P5 S0 G4 S10