ok, I have managed it after all
In the section:
function onClose() {
var abc = defineWorkPlane(currentSection, true);
writeBlock(
gMotionModal.format(0),
conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(abc.x)),
conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(abc.y)),
conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(abc.z))
);
Maybe someone else can use it
Greetings
Olli