XZC lathe - want a straight line...
10 Aug 2014 06:10 #49630
by cts1085
XZC lathe - want a straight line... was created by cts1085
Ok - Given that I have a XZC 3-axis lathe - with a large flat platter mounted in the XY plane I want the following commands to make a straight line not a curved line:
G0 C45.621 X5.489
G1 C-45.621 X5.439
I under stand that I would get a curved line if I did the following (Since I am just moving 1 axis):
G0 C45.621 X5.489
G1 C-45.621
I can redo the GCODE to make much smaller segments to get the straight line but i was hoping not to have to do that.
Is this something where I may have to get involved in the kinematics???
Attached is my configuration.
Note: My configuration is:
Z-Axis - Parallel to the ways of the lathe (+Z is to the right)
X-Axis - Perpendicular to the ways (+x comes straight to the operator)
C-Axis - rotates around the Z-Axis
The tool is setup parallel to the Z-Axis so a -Z cuts into the platter. +Z moves it away.
I am converting normal X/Y/Z coordinates using polar conversion to X & C and the Z stays the depth.
G0 C45.621 X5.489
G1 C-45.621 X5.439
I under stand that I would get a curved line if I did the following (Since I am just moving 1 axis):
G0 C45.621 X5.489
G1 C-45.621
I can redo the GCODE to make much smaller segments to get the straight line but i was hoping not to have to do that.
Is this something where I may have to get involved in the kinematics???
Attached is my configuration.
Note: My configuration is:
Z-Axis - Parallel to the ways of the lathe (+Z is to the right)
X-Axis - Perpendicular to the ways (+x comes straight to the operator)
C-Axis - rotates around the Z-Axis
The tool is setup parallel to the Z-Axis so a -Z cuts into the platter. +Z moves it away.
I am converting normal X/Y/Z coordinates using polar conversion to X & C and the Z stays the depth.
Please Log in or Create an account to join the conversation.
11 Aug 2014 19:32 #49686
by andypugh
I think you will need one of these.
A coordinated move between two axes proceeds proportionally along each axis.
Considering your coordinates:
G0 C45.621 X5.489
G1 C-45.621 X5.43
The question is whether the mid-way point is on your straight line.
ie: C0 X5.4595
And clearly it isn't as it is at the same radius from the centre as the end-points, and it really needs to be the point C0 X3.818382083
Adding that point helps, but then the new intermediate points (C22.8105 X4.653691042) are not on the straight line either.
The only way to do this is going to be to have lots of short moves, or special kinematics.
Rather than use kinematics, you could use G-code calculations. For example a G-code loop that iterates along the line between the end points 0.01" steps and which calculates a new X and C for each point and generates a move. As far as the motion controller is concerned this will look just the same as a long section of linear G-code and will blend (or not) just the same way.
Replied by andypugh on topic XZC lathe - want a straight line...
I can redo the GCODE to make much smaller segments to get the straight line but i was hoping not to have to do that.
Is this something where I may have to get involved in the kinematics???
I think you will need one of these.
A coordinated move between two axes proceeds proportionally along each axis.
Considering your coordinates:
G0 C45.621 X5.489
G1 C-45.621 X5.43
The question is whether the mid-way point is on your straight line.
ie: C0 X5.4595
And clearly it isn't as it is at the same radius from the centre as the end-points, and it really needs to be the point C0 X3.818382083
Adding that point helps, but then the new intermediate points (C22.8105 X4.653691042) are not on the straight line either.
The only way to do this is going to be to have lots of short moves, or special kinematics.
Rather than use kinematics, you could use G-code calculations. For example a G-code loop that iterates along the line between the end points 0.01" steps and which calculates a new X and C for each point and generates a move. As far as the motion controller is concerned this will look just the same as a long section of linear G-code and will blend (or not) just the same way.
Please Log in or Create an account to join the conversation.
11 Aug 2014 19:51 #49687
by cts1085
Replied by cts1085 on topic XZC lathe - want a straight line...
Andy,
Thank you for your comments. They helped me to feel that I was not wasting my time on a solution that i now have working.
What I am doing is taking the f-engrave python code from Scorchworks and modify it for my configuration (XZC).
I have that effort completed and can now take a normal DXF files (2d) and render it on my lathe in the XC plane. Pretty cool.
I broke down the line segments into 1mm lengths and it looks quite pleasing to the eye. I also put in breaks at the center point to allow time for the rotation to be right when it starts again with a continuous line through x=0, y=0.
I agree that if I am doing something original i have taking the g-code programming paradigm and coded it taking advantage of the rotational axis.
This is a great environment to play in and i appreciate the expertise of this community.
<I still need to post a picture of my machine in the show-off area - should have that done this week.>
Again, Thank you!
-Tom
Thank you for your comments. They helped me to feel that I was not wasting my time on a solution that i now have working.
What I am doing is taking the f-engrave python code from Scorchworks and modify it for my configuration (XZC).
I have that effort completed and can now take a normal DXF files (2d) and render it on my lathe in the XC plane. Pretty cool.
I broke down the line segments into 1mm lengths and it looks quite pleasing to the eye. I also put in breaks at the center point to allow time for the rotation to be right when it starts again with a continuous line through x=0, y=0.
I agree that if I am doing something original i have taking the g-code programming paradigm and coded it taking advantage of the rotational axis.
This is a great environment to play in and i appreciate the expertise of this community.
<I still need to post a picture of my machine in the show-off area - should have that done this week.>
Again, Thank you!
-Tom
Please Log in or Create an account to join the conversation.
11 Jul 2017 04:14 #95638
by snujcnc
Replied by snujcnc on topic XZC lathe - want a straight line...
Please Log in or Create an account to join the conversation.
11 Jul 2017 19:56 #95692
by jtc
Replied by jtc on topic XZC lathe - want a straight line...
If you program a arc in XC plane with the right maths the result can be a straight line? as far i remember, to do a straight line the X axis moves upwards and downwards with constant rotation of C.
something like
btw, a couple years back I worked on a Okuma with C axis that have a XC to XY interpolation, and was very easy to program like this way, just like normal XY coordinates
João
something like
G1 X100 C0
G3 X100 C90 R"x"
btw, a couple years back I worked on a Okuma with C axis that have a XC to XY interpolation, and was very easy to program like this way, just like normal XY coordinates
João
Please Log in or Create an account to join the conversation.
11 Jul 2017 20:01 #95693
by andypugh
Replied by andypugh on topic XZC lathe - want a straight line...
LinuxCNC doesn't know about XC arcs though.
Please Log in or Create an account to join the conversation.
11 Jul 2017 20:05 #95694
by jtc
Replied by jtc on topic XZC lathe - want a straight line...
Please Log in or Create an account to join the conversation.
Time to create page: 0.075 seconds