Hi Janis,
See the example \KFLOPtoPCCmdExamples.c on how to use DoPC() to send those type of commands from KFLOP to KMotionCNC.
You might also add some protection in a forever monitor loop that would always disable both the Master and Slave axes if one or the other is disabled regardless of whether they were slaved.
HTH
Regards