How to Achieve Smooth Motion for Rotational Axes? G64?
- shaying526
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 1
14 Nov 2024 01:35 - 14 Nov 2024 01:39 #314413
by shaying526
How to Achieve Smooth Motion for Rotational Axes? G64? was created by shaying526
I have a machine with XYZ and C axes. When I use G64 for motion along axes like XYZ only, similar to the following code:
G01 F3000
G64
G01 X0 Y0 Z0
G01 X0.1 Y0.1 Z0.1
G01 X0.2 Y0.2 Z0.2
...
G01 X69.9 Y69.9 Z69.9
G01 X70 Y70 Z70
The machine moves at a speed of 3000, which is what I want
However, when I add a rotational axis like C, similar to the following code:
...
G01 X0 Y0 Z0 C0
G01 X0.1 Y0.1 Z0.1 C0.1
...
G01 X69.9 Y69.9 Z69.9 C69.9
G01 X70 Y70 Z70 C70
The machine moves very slowly. It seems that G64 only affects the XYZ axes? I conducted another test where only the C axis moved, similar to the following code:
...
G01 C0
G01 C0.1
...
G01 C69.9
G01 C70
Again, the movement was very slow.
How can I solve this problem? I want to achieve smooth motion when the linear axes XYZ and the rotational axis C move simultaneously.
G01 F3000
G64
G01 X0 Y0 Z0
G01 X0.1 Y0.1 Z0.1
G01 X0.2 Y0.2 Z0.2
...
G01 X69.9 Y69.9 Z69.9
G01 X70 Y70 Z70
The machine moves at a speed of 3000, which is what I want
However, when I add a rotational axis like C, similar to the following code:
...
G01 X0 Y0 Z0 C0
G01 X0.1 Y0.1 Z0.1 C0.1
...
G01 X69.9 Y69.9 Z69.9 C69.9
G01 X70 Y70 Z70 C70
The machine moves very slowly. It seems that G64 only affects the XYZ axes? I conducted another test where only the C axis moved, similar to the following code:
...
G01 C0
G01 C0.1
...
G01 C69.9
G01 C70
Again, the movement was very slow.
How can I solve this problem? I want to achieve smooth motion when the linear axes XYZ and the rotational axis C move simultaneously.
Last edit: 14 Nov 2024 01:39 by shaying526.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19408
- Thank you received: 6507
14 Nov 2024 02:38 #314415
by tommylight
Replied by tommylight on topic How to Achieve Smooth Motion for Rotational Axes? G64?
8 years old video, but should be still relevant:
Please Log in or Create an account to join the conversation.
- shaying526
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 1
14 Nov 2024 07:09 #314426
by shaying526
Replied by shaying526 on topic How to Achieve Smooth Motion for Rotational Axes? G64?
Thank you for your reply. I carefully watched the video you sent.
The issue discussed in the video is one that I may encounter later, and it was very helpful.
However, I think I may be describing a different issue. I forgot to mention a detail when I was asking my question just now. It's actually this issue that I'm more eager to solve.
When using different step values, the degree of deceleration of the rotary axis varies. The smaller the step value, the lower the speed. However, this issue does not occur with the linear axis when using G64.
For the linear axis, regardless of whether the incremental step is 1, 0.1, or 0.01, the velocity can reach 3000 when using G64.
With the rotary axis, when the step value is 1, the vel is 2800.
When the step value is 0.1, the vel is 866.
When the step value is 0.01, the vel is 262.
For example:
G64 P0.01
G01 F3000
;Linear axis step 1
G01 X0 Y0 Z0
G01 X1 Y1 Z1
...
G01 X70 Y70 Z70; vel: 3000
;Linear axis step 0.1
G01 X0.1 Y0.1 Z0.1
G01 X0.1 Y0.1 Z0.1
...
G01 X69.9 Y69.9 Z69.9
G01 X70 Y70 Z70; vel: 3000
;Linear axis step 0.01
G01 X0.01 Y0.01 Z0.01
G01 X0.01 Y0.01 Z0.01
...
G01 X69.99 Y69.99 Z69.99
G01 X70 Y70 Z70; vel: 3000
;rotational axis step 1
G01 C0
G01 C1
...
G01 C69
G01 C70; vel: 2800
;rotational axis step 0.1
G01 C0
G01 C0.1
...
G01 C69.9
G01 C70; vel: 866
;rotational axis step 0.01
G01 C0
G01 C0.01
...
G01 C69.99
G01 C70; vel: 262
G01 C0.01
Thank you again for your reply!
The issue discussed in the video is one that I may encounter later, and it was very helpful.
However, I think I may be describing a different issue. I forgot to mention a detail when I was asking my question just now. It's actually this issue that I'm more eager to solve.
When using different step values, the degree of deceleration of the rotary axis varies. The smaller the step value, the lower the speed. However, this issue does not occur with the linear axis when using G64.
For the linear axis, regardless of whether the incremental step is 1, 0.1, or 0.01, the velocity can reach 3000 when using G64.
With the rotary axis, when the step value is 1, the vel is 2800.
When the step value is 0.1, the vel is 866.
When the step value is 0.01, the vel is 262.
For example:
G64 P0.01
G01 F3000
;Linear axis step 1
G01 X0 Y0 Z0
G01 X1 Y1 Z1
...
G01 X70 Y70 Z70; vel: 3000
;Linear axis step 0.1
G01 X0.1 Y0.1 Z0.1
G01 X0.1 Y0.1 Z0.1
...
G01 X69.9 Y69.9 Z69.9
G01 X70 Y70 Z70; vel: 3000
;Linear axis step 0.01
G01 X0.01 Y0.01 Z0.01
G01 X0.01 Y0.01 Z0.01
...
G01 X69.99 Y69.99 Z69.99
G01 X70 Y70 Z70; vel: 3000
;rotational axis step 1
G01 C0
G01 C1
...
G01 C69
G01 C70; vel: 2800
;rotational axis step 0.1
G01 C0
G01 C0.1
...
G01 C69.9
G01 C70; vel: 866
;rotational axis step 0.01
G01 C0
G01 C0.01
...
G01 C69.99
G01 C70; vel: 262
G01 C0.01
Thank you again for your reply!
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3946
- Thank you received: 1705
14 Nov 2024 08:22 #314428
by Aciera
Replied by Aciera on topic How to Achieve Smooth Motion for Rotational Axes? G64?
That is likely because LinuxCNC falls back to one-line lookahead for moves involving any other axis than XYZ. This means that velocity is no longer blended over multiple path segments. The motion planner sets the speed as to be able to stop the movement at the end of the next segment which means that the shorter the segment the slower the speed.
This is an internal limitation of the current motion planner, as a workaround for multi axis gcode generated by CAM it is usually recommended to output longer segments.
This is an internal limitation of the current motion planner, as a workaround for multi axis gcode generated by CAM it is usually recommended to output longer segments.
The following user(s) said Thank You: snowgoer540
Please Log in or Create an account to join the conversation.
- shaying526
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 1
14 Nov 2024 09:27 #314430
by shaying526
Replied by shaying526 on topic How to Achieve Smooth Motion for Rotational Axes? G64?
Thank you for your reply.
linuxcnc.org/docs/2.9/html/user/user-con...gramming-the-planner
I have read the following document, Naive CAM Detector section.
"Naive CAM Detector
Successive G1 moves that involve only the XYZ axes that deviate less than Q- from a straight line are merged into a single straight line."
As you said, CAM seems to only work on XYZ? Is there any other solution? except 'output longer segments'.
linuxcnc.org/docs/2.9/html/user/user-con...gramming-the-planner
I have read the following document, Naive CAM Detector section.
"Naive CAM Detector
Successive G1 moves that involve only the XYZ axes that deviate less than Q- from a straight line are merged into a single straight line."
As you said, CAM seems to only work on XYZ? Is there any other solution? except 'output longer segments'.
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds