Safety notice: If you're not experienced working with CNC spindles or endmills of the size used in a PrintNC, take care to understand the forces involved.
If you lose your grip while changing a tool, make sure your body can't come in contact with something sharp (and the tool can't come in contact with something that it will destroy (or be destroyed by.))
usually there are 2 normally closed switches in the TLS, the first switch triggers immediately (used for probing) and the second switch triggers later ( the over-travel / saftey switch)
there are 4 wires coming out, on mine green/yellow were for the probing switch, and red/black for the over-travel switch, but with a multimeter you can simply measure the continuity between cables, and the pair which looses continuity first, when pressed, is your probing switch
the probing switch is wired to the PROBE Input on the HAL2K board, (to Sig/GND)
the over-travel switch is wired in series with the HALT input on the HAL2K board, so pressing either the Overtravel or the HALT button (also your HALT button should be NC) should stop the machine immediately. (Don't skip this, you inevitable crash something into the TLS, and this is a real pita to disassemble, ask me how i know)
with the wiring done, open IOSender and confirm, that the switches are actually working, by pressing it, and checking the lights in IOSender
ok, that's the bare minimum you need, to do some sort of tool length offset measurement.
with this setup you can use the Probing tab in IO Sender, and probe your tools manually
Now to the semi-automatic part, where the Controller reads the M6 Gcode and will do the Offset measurement automatically:
your Postprocessor needs to put out the M6 Gcode, in Fusion360 the GrblHAL PP is able to do this:
double check if the generated G-Code contains the M6 command
in IOSender, you have to change these options:
under GrblSettings: ToolChange Mode to: Automatic touch off @G59.3
under Offset: change the G59.3 coordinate system to the location of your Tool Length Sensor (the physical location of your TLS on the wasteboard). your spindle will rapid to this position and from there start the seek process
You also need to change the G28 Offset, to the difference between your shortest and longest tool. The issue is, Fusion360 will do a G28 G91 Z0 at the start of every toolpath, which drives the spindle to ZMAX. If you now insert a longer tool, and do a Tool Lenght Offset measurement, the Controller tries to put the stick of the tool, where it previously was. And since the tool is now longer, it will drive the Spindle into the Z Endstop.
to prevent this, you need to set your G28 coordinate system lower, so you have more room in the Z direction for future tool changes with longer tools.