Page 1 of 1

G68 on G18 plane

PostPosted: Thu Feb 06, 2025 4:28 am
by abaeck
Hello,

I'm using UCCNC turn.
It would be really neat if I could use G68 on G18.
I often use my cnc lathe for quick manual jobs, and it would be a quick way to chamfer using MPG.

Alternatively, is there a way I can use AddLinearMoveRel on multiple axes within a plugin?

Re: G68 on G18 plane

PostPosted: Fri Feb 07, 2025 10:11 pm
by cncdrive
We have this planned in the development queqe as well as some other lathe related function.

I don't understand your question, please describe.

Re: G68 on G18 plane

PostPosted: Sun Feb 09, 2025 11:54 pm
by abaeck
Within a custom plugin I've written for a MPG.

I have
Code: Select all
UC.AddLinearMoveRel(0, inc / 2, Math.Abs(eX), 50, e.X > 0); //For X Axis
UC.AddLinearMoveRel(2, inc, Math.Abs(eZ), 50, e.Z > 0); //For Z Axis


Where inc is defined as one of 0.1, 0.01, 0.001.
e.X and e.Z are relative encoder counts from MPGs.

This works great for normal moves.

But I'd like to set an angle in a field and use the X axis MPG to jog on the angle (similar to a compound slide on a manual lathe).
This is what I've tried.

Code: Select all
double rad = angle * (Math.PI / 180);
double dX = inc * Math.Sin(rad) * Convert.ToDouble(e.X);
double dZ = inc * Math.Cos(rad) * Convert.ToDouble(e.X);

UC.AddLinearMoveRel(0, dX / 2, Math.Abs(eX), 50, e.X > 0);
UC.AddLinearMoveRel(2, dZ, Math.Abs(eX), 50, e.X > 0);


When I call two AddLinearMoveRel the motion is not smooth.