@oliof the code i posted is in one of the tool change macros. Calling another macro (T# without the P0) won't help me. In fact, T-1 P0 unselects the current tool without running any macros. Which is what i want, but the tool gets reselected after my code by RRF.
Latest posts made by punktphil
-
RE: Tool (un)loading checks AFTER tfree#.g / tpre#.g
-
Tool (un)loading checks AFTER tfree#.g / tpre#.g
Hey,
I have a toolchanger on my Duet CNC (single spindle, pneumatic clamp for tools).
Toolchanging works as intended. Recently I included a magnetic sensor which checks for the tool in the spindle.
I would like the tfree#.g and tpre#.g to check, if the (un)loading was successful.
My approach is:... if sensors.gpIn[4].value = 0 echo "loading tool failed!" T-1 P0 echo >"persistence/last_tool.g" "" abort "loading tool failed!" else echo "loading tool successful!" echo >"persistence/last_tool.g" "T"^{param.S}^" P0" G100 P{param.S}
(G100 is a macro to Z0 the tip of the tool with a micro switch, param.S is tool index)
Problem:T-1 P0
won't do the trick since RepRapFirmware will mark the tool as "selected" AFTER the tpre#.g (in this case) runs.
Is there a way to tell RRF that loading was unsuccessful?Thanks,
phil -
M950 K parameter
Hey, I just set up my printer to work as a small CNC for PCB milling.
But the M950 command gives me trouble. I'm using a BLDC motor with ESC (PWM Servo control).
50Hz PWM, 1..2ms pulse width
Board: Duet 3 Mini 5+
config:M950 R0 C"io3.out" L0:10000 Q50 K0.05:0.1
I can set the spindle speed with M3 SXXXX, but it still outputs 0..100% PWM.
from https://docs.duet3d.com/en/User_manual/Reference/Gcodes:
Kaaa(:bbb[:ccc]) (optional, for spindles only, RRF 3.5 and later) Optional PWM values (0..1) for spindle control (max [aaa] - or - min, max [aaa:bbb] - or - min, max, idle [aaa:bbb:ccc])
Also, the latest RRF is 3.4.1 (which I'm running). Typo?
Did somebody get the K parameter to work?