Configuring RepRapFirmware for a CoreXY printer
Configuration of the dc42 fork of RepRapFirmware for a CoreXY printer is very similar to configuration for a Cartesian printer, which is described at Configuring RepRapFirmware for a Cartesian printer. Only the differences will be described here.
Main configuration file
To switch the firmware to CoreXY mode, add this command to the movement section:
M667 S1 ; switch to CoreXY mode
Use S1 for CoreXY, S2 for CoreXZ, and S3 for CoreYZ. If any motors move the wrong way, you can use M569 commands to alter the directions. The X motor moves the head in the +X and +Y directions when it runs forwards. The Y motor moves the head in the -X and +Y directions when it runs forwards.
By default, the firmware assumes that the paired axes (e.g. X and Y for a CoreXY machine) move equal amounts when just one motor turns. This is not always the case, for example a CoreXZ machine typically uses additional pulleys so that the Z axis moves only 1/3 of the amount of the X axis. To allow for this, you can use X, Y and Z parameters to specify that the motor movements should be multiplied by the given factor when moving the specified axis. So the typical CoreXZ machine should be configured like this:
M667 S2 Z3 ; switch to CoreXZ mode and multiply motor movements by 3 for the Z axis
The method of setting up simultaneous homing is different for CoreXY printers. On a Cartesian printer, if you use the G1 command with S1 parameter to perform a homing move on several axes simultaneously, each axis will continue moving until either the specified movement amount has been completed or the homing switch for that axis has been triggered. On a CoreXY printer, the whole move will be terminated when the first homing switch is triggered. Therefore, to do simultaneous XY homing, your homeall.g file needs to first home X and Y together, then home them separately. For example, if your printer has homing switches at the low ends of the X and Y axes, use this pattern:
G91 ; relative mode G1 S1 X-240 Y-240 F3000 ; course home X or Y G1 S1 X-240 ; course home X G1 S1 Y-240 ; course home Y G1 X4 Y4 F600 ; move away from the endstops G1 S1 X-10 ; fine home X G1 S1 Y-10 ; fine home Y ; Z homing section follows ...
During commissioning, you can test the X and Y motors independently by using the S2 modifier on the G1 command, like this:
G91 ; relative mode G1 S2 X10 ; move the X motor forward 10mm G1 S2 X-10 ; move the X motor back 10mm G1 S2 Y10 ; move the Y motor forward 10mm G1 S2 Y-10 ; move the Y motor back 10mm G90 ; back to absolute mode