G68 on G18 plane

Here is where you can request new features or special features.

G68 on G18 plane

Postby abaeck » Thu Feb 06, 2025 4:28 am

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?
abaeck
 
Posts: 5
Joined: Fri Jan 20, 2023 12:33 am

Re: G68 on G18 plane

Postby cncdrive » Fri Feb 07, 2025 10:11 pm

We have this planned in the development queqe as well as some other lathe related function.

I don't understand your question, please describe.
cncdrive
Site Admin
 
Posts: 5027
Joined: Tue Aug 12, 2014 11:17 pm

Re: G68 on G18 plane

Postby abaeck » Sun Feb 09, 2025 11:54 pm

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.
abaeck
 
Posts: 5
Joined: Fri Jan 20, 2023 12:33 am


Return to Feature Request

Who is online

Users browsing this forum: No registered users and 5 guests