Two MADDENING problems

  1. I have a VFD wired to a mini-rambo (marlin FW) and working great in testing. M3 is CW, M4 is CCW, and M5 is stop.

However, when a g-code program commands the spindle on, it ALWAYS turns CCW. It doesnt matter if the program calls for M3 or M4. Anyone ever seen this before? I have been driving myself NUTS with a burning wood issue ALL DAY, only to find out the spindle is reversed. Again, it works perfectly from terminal, I had NO reason to suspect it.

  1. G1 move commands will not obey the feedrate. G3 moves will, but once I am out of my ramp and into my cut, the feedrate goes way down, even though the program is calling for the same feedrate.

Please help, banging my head against a wall and WASTING my saturday!

Breaking it down line by line. The M3 command WORKS, then the spindle actually CHANGES direction the moment a move command is issued.

edit #1: the spindle changes direction ONLY when the X axis moves. These are my pin assignments. I dont see any conflicts:

#define X_STEP_PIN 37
#define X_DIR_PIN 48
#define X_ENABLE_PIN 29

#define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 70 // Pullup! 18 was default
#define SPINDLE_DIR_PIN 71 // 19 was default
#define SPINDLE_REV_PIN 85 // Line added as a test to work with VFD

EMI/EMF noise? yes the spindle and the x motor cables run in the same chain, but so do Z and Y

#1 is solved. I had Pin 85 assigned to one of the E0 extruder pins. Not sure if that was default or I was using it as placeholder before I assigned it to Reverse.

On to 2)…

How are you generating your g-code? Can you post a sample where it is not obeying the feedrate?

so here are 30 lines, which include the transition from the ramping section to the adaptive clearing toolpath. The code was generated by the Marlin post in F360:

G3 X51.272 Y53.815 Z-6.174 I-2.545 J1.682 F1524
G3 X47.869 Y49.978 Z-6.397 I-0.47 J-3.011 F1524
G3 X52.767 Y48.483 Z-6.62 I2.929 J0.825 F1524
G3 X52.09 Y53.552 Z-6.844 I-1.966 J2.317 F1524
G3 X47.767 Y50.83 Z-7.067 I-1.287 J-2.749 F1524
G3 X52.036 Y48.036 Z-7.291 I3.031 J-0.027 F1524
G3 X52.799 Y53.074 Z-7.514 I-1.236 J2.764 F1524
G3 X47.907 Y51.673 Z-7.738 I-1.996 J-2.271 F1524
G3 X51.212 Y47.813 Z-7.961 I2.892 J-0.869 F1524
G3 X53.344 Y52.418 Z-8.184 I-0.413 J2.987 F1524
G3 X48.276 Y52.441 Z-8.408 I-2.542 J-1.616 F1524
G3 X50.362 Y47.828 Z-8.631 I2.524 J-1.636 F1524
G3 X53.683 Y51.64 Z-8.855 I0.437 J2.972 F1524
G3 X48.842 Y53.072 Z-9.078 I-2.881 J-0.838 F1524
G3 X49.553 Y48.08 Z-9.302 I1.959 J-2.268 F1524
G3 X53.791 Y50.801 Z-9.525 I1.245 J2.721 F1524
G3 X47.806 I-2.992 F1524
G3 X53.791 I2.992 F1524
G1 X53.792 Y51.151 F1524
G1 X53.815 Y51.325 F1524
G1 X53.82 Y51.356 F1524
G1 X53.825 Y51.391 F1524
G1 X53.83 Y51.428 F1524
G1 X53.833 Y51.469 F1524
G1 X53.835 Y51.513 F1524
G1 Y51.56 F1524
G1 X53.834 Y51.61 F1524
G1 X53.832 Y51.663 F1524
G1 X53.827 Y51.719 F1524
G1 X53.82 Y51.777 F1524

G1 X53.815 Y51.325 F1524
G1 X53.82 Y51.356 F1524

These are very small movements. The controller has a limit to how many commands it can execute per second due to the communication (or loading from the SD card, which is somewhat faster).

It depends on the controller but I had estimated a limit of about 20 commands per second I think.

I would try adjusting the generation on the CAM side to use a lower resolution so you get fewer, larger segments.

Makes sense. What kind of tolerance value do people use for adaptive tool paths in fusion? I think the default was .004, but I was getting really jerky motion at first so I lowered it. Guess I went too far.