Just in case anyone is curious as to the configuration, here it is, slightly generified so that you can change the main params for all 4 axes. On my mill with all the same Nema 23 steppers and identical lead screws this makes sense, although its quite scary to watch Z rapidly plunge at full speed.
Code:
#include "KMotionDef.h"
// Defines axis 0, 1, 2 as simple step dir outputs
// enables them
// sets them as an xyz coordinate system for GCode
const int X=0, Y=1, Z=2, A=3;
const double VEL=88000;
const double ACCEL=160000;
const double JERK=4e+006;
const double PIDP=0, PIDI=0.01, PIDD=0;
int main() {
FPGA(STEP_PULSE_LENGTH_ADD)=32+0x80;
ch0->InputMode=NO_INPUT_MODE;
ch0->OutputMode=STEP_DIR_MODE;
ch0->Vel=VEL;
ch0->Accel=ACCEL;
ch0->Jerk=JERK;
ch0->P=PIDP;
ch0->I=PIDI;
ch0->D=PIDD;
ch0->OutputChan0=X+8;
ch0->LimitSwitchOptions=0x100;
ch0->LimitSwitchNegBit=0;
ch0->LimitSwitchPosBit=0;
ch0->SoftLimitPos=1e+009;
ch0->SoftLimitNeg=-1e+009;
ch0->BacklashMode=BACKLASH_OFF;
ch0->BacklashAmount=0;
ch0->BacklashRate=0;
ch1->InputMode=NO_INPUT_MODE;
ch1->OutputMode=STEP_DIR_MODE;
ch1->Vel=VEL;
ch1->Accel=ACCEL;
ch1->Jerk=JERK;
ch1->P=PIDP;
ch1->I=PIDI;
ch1->D=PIDD;
ch1->OutputChan0=Y+8;
ch1->LimitSwitchOptions=0x100;
ch1->LimitSwitchNegBit=0;
ch1->LimitSwitchPosBit=0;
ch1->SoftLimitPos=1e+009;
ch1->SoftLimitNeg=-1e+009;
ch1->BacklashMode=BACKLASH_OFF;
ch1->BacklashAmount=0;
ch1->BacklashRate=0;
ch2->InputMode=NO_INPUT_MODE;
ch2->OutputMode=STEP_DIR_MODE;
ch2->Vel=VEL;
ch2->Accel=ACCEL;
ch2->Jerk=JERK;
ch2->P=PIDP;
ch2->I=PIDI;
ch2->D=PIDD;
ch2->OutputChan0=Z+8;
ch2->LimitSwitchOptions=0x100;
ch2->LimitSwitchNegBit=0;
ch2->LimitSwitchPosBit=0;
ch2->SoftLimitPos=1e+009;
ch2->SoftLimitNeg=-1e+009;
ch2->BacklashMode=BACKLASH_OFF;
ch2->BacklashAmount=0;
ch2->BacklashRate=0;
ch3->InputMode=NO_INPUT_MODE;
ch3->OutputMode=STEP_DIR_MODE;
ch3->Vel=VEL;
ch3->Accel=ACCEL;
ch3->Jerk=JERK;
ch3->P=PIDP;
ch3->I=PIDI;
ch3->D=PIDD;
ch3->OutputChan0=A+8;
ch3->LimitSwitchOptions=0x100;
ch3->LimitSwitchNegBit=0;
ch3->LimitSwitchPosBit=0;
ch3->SoftLimitPos=1e+009;
ch3->SoftLimitNeg=-1e+009;
ch3->BacklashMode=BACKLASH_OFF;
ch3->BacklashAmount=0;
ch3->BacklashRate=0;
EnableAxisDest(X,0);
EnableAxisDest(Y,0);
EnableAxisDest(Z,0);
EnableAxisDest(A,0);
DefineCoordSystem(X,Y,Z,A);
printf("4 Axis init done!\n");
return 0;
}