I'm trying to write a cutter compensation program, to adjust my path based on an end mill diameter like a CNC would do. I've got the math, just not the execution. I thought was was clever and decided to do it by using the submit interpreter to determine my velocity vector and continuously adjust my TCP accordingly, rather than adjusting positions. Turns out I'm not clever, because I get the KSS01388 "variable write-protected in module" error when I try to write into $TOOL.
I'm thinking maybe calling another program from the sps that can write to $TOOL. If the sps is a total dead end, I might see if I can write a path trigger that can modify it's own trigger conditions so that it activates many times along each movement, and using that to do the $TOOL adjustment.
Anyone know of a way around the write-protect issue? Or, anyone know of a different way to go about implementing cutter comp?
(Running KS V8.5.465 on a KR C4 NA)