v4.1 Beta 3 of the Fusion 360 post processor for MPCNC, LowRider and similar GRBL / Marlin / RepRap machines is available
Download MPCNC_v4.1_Beta3.cps · Release page · Release notes
Overview and install · Hobby Guide · Pro Guide
One thing changed, and it answers GitHub Repository - Spindle Control? ·(Issue #16): the router power, laser and each coolant channel can now name the fan or pin output used to control them. Before, the router could only be prompted for by hand or commanded with M3, the laser could only use fan 0, and coolant could only use one of two pin numbers someone chose in 2018. You now have the ability to specify the fan or pin directly.
Two things before your first job
1. Delete your old copy of the post first. The file is now named MPCNC_v4.1_Beta3.cps. Fusion identifies a post by its filename, so this installs beside existing versions of the post instead of replacing the old version.
2. Three settings return to their defaults. The router defaults to asking you to switch it on, and all four coolant codes default to GRBL’s M7 / M8 / M9. A job posts the same file it did in v4.0 Beta 3 unless you choose otherwise with one exceptions below.
Turning the router on and off
Manual Spindle On/Off is now Spindle Control, with four choices:
-
Prompt the operator (M0) — the default, the post sends no spindle code and stops to ask you.
-
Spindle - M3 S{RPM}/M5 — what a disable checkbox did previously.
-
Fan - M106 P{n} S255/S0 — for a relay wired to a fan header.
-
Pin - M42 P{pin} S255/S0 — for a relay on a spare output pin.
The Fan and Pin options are the change for this release. Note: if using M3 on Marlin you must have a build compiled with the options SPINDLE_FEATURE / LASER_FEATURE.
Both Fan and Pin are on-or-off only: no speed, no direction. The RPM your job asks for goes into a comment, and the file says it was requested rather than commanded — including at every mid-job speed change, so nothing is silently ignored.
The laser bug fix
The Marlin/RepRap fan mode was firing the wrong fan. It was sending M106 with no fan number, and Marlin reads a missing fan number as fan 0. So if your laser was on any fan but 0, it was never fired, and fan 0 was driven at laser power instead. The off code was M107, which on RepRap firmware turns off the current tool’s fans rather than the one you named.
It now sends M106 P{n} S{power} and M106 P{n} S0, with the fan number from the new Laser: Pin/Fan # field. M107 is gone from the post entirely.
Coolant is no longer hardwired to one board implementation
Coolant choices for Marlin were M42 P6 S255 and M42 P11 S255, with the pin number hardcoded into the choice. Those two numbers are RAMPS numbers — the servo header. On a Rambo, the board V1 shipped for the MPCNC, pin 6 is HEATER_2 and pin 11 is Y_MIN, and Marlin refuses M42 on both as protected pins — so the coolant never switched, and nothing in the file said so.
Each channel now names its own output, through Channel A Pin/Fan # and Channel B Pin/Fan #, and the fan form is offered beside the pin form. The GRBL defaults did not move.
One field, four meanings
Pin/Fan # appears in all three groups now, and what the number is depends on the mode and your firmware: a fan index or a board pin on Marlin, a fan number or a GpOut port on RepRapFirmware. Re-check it whenever you change either. A wrong number is not equally visible on the two — RepRapFirmware says “Fan number not found”, while Marlin just returns and says nothing, so the router never starts and the job cuts with a dead spindle.
Two conditions on the pin mode specifically, both Marlin: M42 is only compiled in where DIRECT_PIN_CONTROL is enabled, which stock Marlin ships commented out; and Marlin refuses M42 on a protected pin, which every fan pin is. So use the fan mode for a fan header and the pin mode for a spare output — the pin mode cannot reach a fan header at all.
Three new refusals at job post time
The post now stops before writing a file if:
-
A fan or pin output is chosen for the router or the laser on a GRBL job. GRBL has neither command and answers error:20, which would stops the job with the tool in the cut. The coolant channels warn instead of refusing, on purpose — their labels say which firmware the code shipped for, not that no other firmware takes it.
-
The pin mode is chosen and Pin/Fan # is still 0. Pin 0 is nobody’s router. Fan 0 is a real fan, and is allowed.
-
A coolant channel is switched on with one form and off with the other, which would leave the output running for the rest of the job. If on uses a Pin, so must off.
What testing has been done
Since v4.0-Beta3, testing has used an automated test suite. The regression suite now has 207 test cases across six property matrices that drive changes in property settings. All passed, including the 17 added for this update.
The two facts still hold true with respect to test cases:
-
Differences in firmware behaviour were resolved by reading each firmware’s source code and change log, rather than by running g-code through different controllers. For example, the tests did not switch any relay using different firmware to confirm that pin operations work.
-
The test suite drives Autodesk’s own headless post engine over both their standard intermediate test files and a series of custom files. The post processor’s dialog itself is never exercised by the regression test suite, but Fusion’s property panel is visually checked, but not for every test scenario.
This is still a beta. While the author has made his best efforts to ensure it is correct, user feedback is required before the Beta tag is removed. Review your g-code before you cut.
If you find an issue, you can post it here or, better yet, directly on the Issues Page of the mpcnc_post_processor in GitHub.