I recently upgraded my ooznest OX cnc machine from the original xPro USB controller (GRBL based) to the Duet3d (marlin based?)
Ooznest typically use this on their newer workbee machines and they provide a post processor in the downloads for that machine. However, they also ship all of their machines for use with trim routers which you manually switch on/off and don’t have any RPM control. Whereas I run my OX with a chinese 2.2KW water cooled spindle run from a VFD.
So I took the liberty to create a new version of the post processor that outputs spindle start, RPM, and spindle stop commands in the relevant places. I also have my processor drive the machine home at the end of every file. Note the spindle doesn’t shutdown until after the homing operation. I thought about shutting it down first. But honestly in the past I’ve accidentally homed it through things like work holding clamps and at least with the spindle on it just cuts through them 😉
Obviously that will only work if you have also configured your duet to sent spindle rpm commands to your vfd, you can see how I set up mine in the wiring video here: