I have an 2 axis ACRO system w/servo controlled by a Blackbox x4, with a python script utilizing michaelfranzl/gerbil for motion planning. The general workflow is: open serial port and initiate connection start polling wait for grbl 'welcome message' unlock alarm move pen up home move between series of points, pen up, sleep, pen down, etc return to home disconnect Rarely, as the script is disconnecting from the serial port, the pen will move up farther than I ever command it to, jamming the system mechanically. I know you wouldn't support 3rd party libraries, but is this something that's been seen before with BlackBox or grbl? Something I could be missing? Could this be something that happens when the PWM output stops suddenly before the power does, and the servo interprets this is a different commanded position? If so, how could I work around that?
As servos rely on pulse trains for position, resets etc (times when firmware is not running) stops pulse trains. Design your hardware so m3S0 does not result in a crash
Okay, thanks for the response. I suppose I could feed the 5V for the servo through the relay to cut power when the pulse train is not ready, right?
with GRBL's servo control it will always move the servo to whichever end is PWM level 0 when an M5 is received. (common at the end of gcode programs) M5 is sometimes different position to M3 S0, but close to it. This means that your mechanical setup must allow the servo to move to that extreme, AND that end of movement should be 'pen up' so it is safe. So, the disconnect is sometimes triggering a 'M5' condition which I believe sets the PWM level to 0. different servos will react differenly to that condition, most will drive to one end of travel, some will just maintain current position (probably the expensive digital ones ) Better to configure the hardware so any movement is safe.