This is where I keep my current MPCNC config in case I have to reflash it:
Single endstops software enabled (G53 Xpos Ypos only) – Marlin_software_endstops_enabled+G54fix.zip
Single endstops software disabled – Marlin_software_endstops_disabled.zip
It is now time to plot the obligatory MPCNC crown test pattern with a pen holder and pen.
https://www.thingiverse.com/thing:3609897
MPCNC_Sharpie_Pen_Tool_Holder.zip
https://www.v1engineering.com/wp-content/uploads/2015/09/Test-Crown-12mms.gcode
This is the actual result of the very first time the machine was used to plot a file. I had to restart the operation as the pen tip was a fraction too close to the surface and started dragging. The second attempt completed successfully.
https://github.com/guffy1234/mpcnc_posts_processor
Rename *.txt to *.cps and place inside “C:\Users\…\Appdata\Roaming\Autodesk\Fusion 360 CAM\Posts”
When generating Gcode in Fusion360 select “Setup” and select ‘Use Personal Posts’ from the drop down list.
So as a first attempt I created a drill grid for a 920x920mm spoilboard consisting of a 9 x 9 points grid with 100mm spacing and a 60mm edge perimeter:
I then generated a center drilling toolpath and loaded the MPCNC Fusion360 Post processor to generate Gcode:
I had to leave some holes out as the machine could not reach.
The resulting code looks as follows: spoilboard.gcode
When I ran the Gcode on the machine I realized my machine does not do absolute negative machine coordinates. I have dual steppers enabled, but not dual endstops (X1min + X2min + Y1min + Y2min) in Config_adv.h. I do however have Xmin and Ymin enabled in Config.h. I do not have limit switches installed as of yet. As soon as you have Xmin and Ymin enabled, the machine will force you to stay within the bed area. This means absolute negative machine coordinates are not allowed; you cannot move beyond the lower left corner. When I power up the machine with the spindle located in the center of the spoilboard, this effectively becomes X0 Y0 Z0 and I cannot move to the left or to the bottom from here as that is considered outside of the bed area.
I tried this:
This should enable me to use positive machine coordinate throughout and be able to run my Gcode using work (offset) coordinates from the center of the spoilboard, using both positive and negative move values.
Note that CNC.js sends a G10 L20 P1 X0 Y0 to zero the work coordinates. Marlin firmware does not support G10 L20 P1 X0 Y0 commands.
A more detailed explanation can be found here:
https://github.com/synthetos/g2/wiki/Gcode-Coordinate-Offsets
‘P’ represents work coordinate system (1-6) and corresponds to G54 – G59, respectively. G53 is the machine coordinate system. Marlin does support G54 – G59 work coordinate systems:
/**
* CNC Coordinate Systems
*
* Enables G53 and G54-G59.3 commands to select coordinate systems
* and G92.1 to reset the workspace to native machine space.
*
#define CNC_COORDINATE_SYSTEMS
CNC_Coordinate_Systems is enabled in my [Configuration_adv.h]. However, Marlin does not recognize G10 L20 P1 X0 Y0 Z0 commands unfortunately.
I have lodged a feature request with the great developer community of Marlin:
https://github.com/MarlinFirmware/Marlin/issues/14734
G10 L20 P1 X0 Y0 Z0 is identical to executing G54 followed by G92 X0 Y0 Z0 and then returning to the original coordinate system.
I did some more research and discovered Marlin treats G53 (machine coordinate system) and G54 (1st work offset coordinate system) the same. You cannot set a new origin in G54 without it also affecting the origin of G53 and vice versa (!)
I have reported this as a bug on the Marlin github page issue tracker:
https://github.com/MarlinFirmware/Marlin/issues/14743
I discovered using G55 (2nd work offset coordinate system) works fine however. I have implemented a bugfix that allows G54 to work as well.
So all I have to do is the following:
I tested this and it works properly. Xmin and Ymin enstop positions also work correctly and are relative to the G53 machine coordinate system origin as they should. Even if I am in G54 I cannot go past Xmin and Ymin, which is a nice safety feature.
The one disadvantage is that CNC.js Axes widget does not display work (offset) coordinates. This is because Marlin only outputs a single set of coordinates at a time.
More detailed information here:
https://github.com/cncjs/cncjs/issues/514
In order to use CNC.js keypad jogging you will need to first disable / hide the Console Widget as otherwise the Console Widget will hijack all keyboard input. Then, click on the keyboard symbol in the Axes Widget to enable keypad jogging. Make sure to set the step size to a safe value before pressing Arrow Keys or Page Up / Page Down.:
I noticed when the machine hits an endstops Marlin simply skips any gcode operations in the restricted area and simply continues when it returns to the work bed area. This is undesirable; I would expect an emergency stop.
After all this I decided to simply disable software endstops and work in G53 unrestricted. This will allow me to simply move the spindle by hand to the origin of choice and power up the logic board from there.
<To be continued>
1. Spot drill hole pattern in spoilboard.
2. Manually drill through using suitable bit.
3. Insert (glue?) threaded inserts.
1. Spot drill hole pattern in CNC bed to hold down spoilboard.
2. Manually drill through using suitable bit.
3. Insert (glue?) threaded inserts.
Endstops
Z axis min/max endstop.
Dual endstop micro switch calibration using Xmax and Ymax:
>>> https://www.v1engineering.com/forum/topic/dual-endstops/
(MKS Gen L v1.0 + color/touch LCD) -> LCD = extra CPU load + distraction ?)
Emergency stop ideas
Multimeter Z probe