Switching loop control on certain conditions
Posted: Sun Jun 16, 2024 9:26 pm
Hi Tom,
I have a milling machine with KFLOP and KANALOG, the front end is Mach3. All axes have servos and glass scales and are in closed loop. An additional probe (incremental glass ruler) is installed on the Z axis concentrically (as a ring) to the endmill, total stroke approx. 20 mm. The measured value from this probe is input to a free channel (6). The probe touches the milling surface a few millimeters before the endmill. If I make use of this probe in a dual loop, I can always achieve a consistent milling depth on uneven surfaces. But to raise the milling cutter and drive rapids, I would have to edit the G-code by hand and insert additional M-codes etc. I would like to avoid that.
The following idea:
1.) Z-axis is raised. The regular Z encoder is active.
2.) X and Y are in milling position, Z destination is a negative value, Z axis moves downwards until the additional Z probe touches the surface. The software recognizes that the surface has been reached because the additional Z encoder is now providing values. Automatic switching to dual loop, milling process with height control.
3.) If a positive Z value is received via G-code, dual loop is terminated, the loop is closed via the regular Z encoder, axis moves upwards.
Would that work? What query in the INI file would be necessary to recognize that the additional encoder has reached the surface in order to switch to dual loop? How can I detect positive Values for Z and change the loop-control with this condition?
Best regards Thomas
I have a milling machine with KFLOP and KANALOG, the front end is Mach3. All axes have servos and glass scales and are in closed loop. An additional probe (incremental glass ruler) is installed on the Z axis concentrically (as a ring) to the endmill, total stroke approx. 20 mm. The measured value from this probe is input to a free channel (6). The probe touches the milling surface a few millimeters before the endmill. If I make use of this probe in a dual loop, I can always achieve a consistent milling depth on uneven surfaces. But to raise the milling cutter and drive rapids, I would have to edit the G-code by hand and insert additional M-codes etc. I would like to avoid that.
The following idea:
1.) Z-axis is raised. The regular Z encoder is active.
2.) X and Y are in milling position, Z destination is a negative value, Z axis moves downwards until the additional Z probe touches the surface. The software recognizes that the surface has been reached because the additional Z encoder is now providing values. Automatic switching to dual loop, milling process with height control.
3.) If a positive Z value is received via G-code, dual loop is terminated, the loop is closed via the regular Z encoder, axis moves upwards.
Would that work? What query in the INI file would be necessary to recognize that the additional encoder has reached the surface in order to switch to dual loop? How can I detect positive Values for Z and change the loop-control with this condition?
Best regards Thomas