Oh, I see. It’s only checking to see what speed the fan should be at 10Hz.
So, either:
a) this is a bug. Doubtful, its doing what the commwnt says.
b) this isn’t thw right way to laser. But the laser mode stops for every move.
c) this should be a parameter. I think either adding a CONSTANT_FAN_CHECK configuration or setting the 100UL by a condiguration value is reasonable. It’s worth a PR.
So why is David’s working right, but the rest of us seem to be having problems. I’m running ramps and the same laser he is. It’s late here, and I’m burned, maybe I’m just missing something…?
The firmware is the problem… the board, laser, and gcode file are fine. What version of the firmware are your running?
How do you have your RAMPS and laser connected? On my RAMPS, I have the D9 fan output (a +12v PWM signal) reamapped to pin 44 (now a +5v PWM signal) to feed the TTL modulation input to the laser. The M106/M107 gcode commands now control the laser’s power.
Ideally, similar to grbl’s laser mode, there wouldn’t be any changes to acceleration because of the laser, and the changes in acceleration would finely tune the laser power. This would be a bigger change, but it would be awesome. I don’t think we need to deaign it either, because grbl already has. IIRC, there is a min on laser setting, and when the acceleration is reducing the speed by X percentage, the laser power is reduced to X times the difference between the current set point and the min. The math isn’t hard, but finding when to set it, and what the acceleration reduction is (over all axes) is necessary.
I’m sure the main devs would be able to whip it up.
There are a lot of marlin laser machines out there, and I’ve been impressed with how much Marlin has adapted to corner cases.
I agree thay fundamentally, the current spindle stuff is the wrong fit. So it the fan.
That’s talking about the “right way”. There’s still the “Right Now” options. If bastardizing the fan or spindle options makes more sense, then that’s still a worthwhile configuration.
Shoot, this is complicated. Besides better timing, my bigger laser always overshot the raster image to allow for accelerations. So this could be a software fix, before you get to excited Heffe, This would not help with vector art…but with vector art a little darker near corners usually is not an issue. For through cuts no big deal. If you add a laser power curve (I doubt a laser powers linearly) to sync with accelerations then you would need a way to tune it.
So get the laser working as is, and try to get the software fixed, or really try to get it all in the firmware?
I lied. Woke up too early so I tried pulling out all the M3/5 related delays. That didn’t change anything. I really don’t understand the planner enough to know why it still stops each value change.
Am I understanding this correctly? To get the laser working in the Marlin 2.0 code, comment everything except that one line? So it would look like this?
Three lines commented out in Marlin.cpp
// Limit check_axes_activity frequency to 10Hz // static millis_t next_check_axes_ms = 0; //commented out for mpcnc-laser // if (ELAPSED(ms, next_check_axes_ms)) { //commented out for mpcnc-laser planner.check_axes_activity(); // next_check_axes_ms = ms + 100UL; //commented out for mpcnc-laser
Three lines commented out in planner.cpp
/** * Maintain fans, paste extruder pressure, */ // void Planner::check_axes_activity() { //commented out for mpcnc-laser // uint8_t axis_active[NUM_AXIS] = { 0 }, //commented out for mpcnc-laser // tail_fan_speed[FAN_COUNT]; //commented out for mpcnc-laser
Because if I do that, the compile fails very quickly with this error:
Marlin.cpp:31:20: error: Marlin.h: No such file or directory