I’d just like to share this for anyone that might be interested.
I have a tool changer that I built based on the E3D tool changer. There are currently three tool heads on it all with the ToolBoard 1LC. Occasionally, a tool change will fail and I needed a way to check for that and pause the print.
I purchased and installed the TRCT1010 optical sensors as recommended by the documentation. Next, I printed a flag to trip the sensor and with the “Object Model” plug in I was able to command a tool change and verify that everything was working as intended. (0 = tool is docked, 1 = not docked). Finally, a macro will loop over all tools and check that the selected tool is not docked and that all others are. I call this macro first thing in the tpost.g for each tool.
Hope this helps someone!
var iter = 0;
var numTools = 3
var checkValue = 0; 0 = docked
if state.currentTool = -1
; if there's no tool selected, return
M99
while var.iter<var.numTools
; set check value to 1 if i = current tool
if var.iter = state.currentTool
set var.checkValue = 1
else
set var.checkValue = 0
if sensors.gpIn[var.iter].value != var.checkValue ; tool change failed
M291 P"tool change failed" S2
M98 P"pause.g"
set var.iter = var.iter+1
M99