Continue GCode w/ Axes Disabled
Posted: Fri Jun 25, 2021 3:37 pm
So I built a pick-and-place robot with Kflop + Kstep to test some sensors I am using - my problem right now is the electronics that I am using to read these sensors is built on development boards and is pretty much impossible (at this point) to shield from motor noise.
If I kill the motor power however (i.e. disable()) then the noise lowers to an acceptable level... Is there any way to run GCode that will intermittently disable/re-enable the motors?
I have tried using M codes to run programs (i.e. M100 disables all axes motors and M101 re-enables them) via something simple like the below GCode example - but when the GCode gets to the first M100 (disable) it aborts the program due to the Axes being Disabled... Is there a workaround for this somehow?
G21 G54
G0Z20
G4P0.5
G0X0Y0
G4P0.5
G1Z0F500
G4P.1
M100
G4P5
G1Z20F500
G4P.1
M100
G4P5
G1Z20F500
G0X0Y0
M30
If I kill the motor power however (i.e. disable()) then the noise lowers to an acceptable level... Is there any way to run GCode that will intermittently disable/re-enable the motors?
I have tried using M codes to run programs (i.e. M100 disables all axes motors and M101 re-enables them) via something simple like the below GCode example - but when the GCode gets to the first M100 (disable) it aborts the program due to the Axes being Disabled... Is there a workaround for this somehow?
G21 G54
G0Z20
G4P0.5
G0X0Y0
G4P0.5
G1Z0F500
G4P.1
M100
G4P5
G1Z20F500
G4P.1
M100
G4P5
G1Z20F500
G0X0Y0
M30