I have a quite similar Problem:
I want to switch a on/off realy to switch the spindle via the M3/M5 command.
The relay is connected the fan port 7 of a Duet3 board.
I configured the following lines:
"M453 P7 S0 T0 C"out1+out7+out2" ; set CNC Mode"
Result:
"M3" does not switch the relay, but "M3 S1" does.
"M5" stops the spindle, as intended.
How can I configure the board, so I can switch the spindle with "M3" only, without M1, because this is how the gcode ist generated my the postprocessor?