[4th axis] How do you set-up your rotary axis?
- Mecanix
- Offline
- Platinum Member
Less
More
- Posts: 446
- Thank you received: 216
16 Jan 2024 10:13 - 16 Jan 2024 10:50 #290853
by Mecanix
[4th axis] How do you set-up your rotary axis? was created by Mecanix
Hey guys. Having difficulties getting consistency between operations. Some works great (indexable drilling for instance), others are instant multi-thousand dollar crashes and what not (simultaneous for instance). Not sure where to begin with this. Let's start with; is Linuxcnc even capable of more-than-three-axis in a relatively consistent and safe manner?
If so, how do you set-up your kin in CAM and Linuxcnc?
0 ~ 360deg?
-360 ~ 360?
-36000000 ~ 36000000?
Modulo mode capable?
WRAPPED_ROTARY - how do you set-up for that one (whatever it does and mean)?
Am I correct assuming Lcnc is set for "unlimited" only? As in only works with outta this world's >360degree angles (aka A32334456degree). Asking because my version unwind the whole 358deg if programmed N1 A359 ~ N2 A1. Really is only 2degree of motion here. Magnitude, sign dir? what's the voodoo again?
If so, how do you set-up your kin in CAM and Linuxcnc?
0 ~ 360deg?
-360 ~ 360?
-36000000 ~ 36000000?
Modulo mode capable?
WRAPPED_ROTARY - how do you set-up for that one (whatever it does and mean)?
Am I correct assuming Lcnc is set for "unlimited" only? As in only works with outta this world's >360degree angles (aka A32334456degree). Asking because my version unwind the whole 358deg if programmed N1 A359 ~ N2 A1. Really is only 2degree of motion here. Magnitude, sign dir? what's the voodoo again?
Last edit: 16 Jan 2024 10:50 by Mecanix.
Please Log in or Create an account to join the conversation.
- Aciera
- Away
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
16 Jan 2024 12:19 - 16 Jan 2024 12:19 #290860
by Aciera
Replied by Aciera on topic [4th axis] How do you set-up your rotary axis?
You have probably already found this, regarding WRAPPED_ROTARY
linuxcnc.org/docs/html/config/ini-config.html
linuxcnc.org/docs/html/config/ini-config.html
Attachments:
Last edit: 16 Jan 2024 12:19 by Aciera.
Please Log in or Create an account to join the conversation.
- Aciera
- Away
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
16 Jan 2024 12:24 #290861
by Aciera
Replied by Aciera on topic [4th axis] How do you set-up your rotary axis?
Generally I would suggest to have a look at a sim config with a rotary and check things out that way. For example:
'configs/sim/axis/vismach/5axis/table-dual-rotary'
This config has a dual-rotary (AB) table but you can certainly also use it with only the A.
'configs/sim/axis/vismach/5axis/table-dual-rotary'
This config has a dual-rotary (AB) table but you can certainly also use it with only the A.
The following user(s) said Thank You: Mecanix
Please Log in or Create an account to join the conversation.
- Aciera
- Away
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
16 Jan 2024 12:26 #290862
by Aciera
Replied by Aciera on topic [4th axis] How do you set-up your rotary axis?
Also note that the current motion planner will fall back to one line look ahead for any line of gcode that contains more than XYZ. This may cause slow or jerky motion with gcode that contains a lot of short segments.
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
Less
More
- Posts: 504
- Thank you received: 157
16 Jan 2024 13:39 #290869
by Hakan
Replied by Hakan on topic [4th axis] How do you set-up your rotary axis?
Limitless rotation (more or less)Reset of position at the end of every g-code programAnd a post-processor that generates inverse time feed parameters.
If you just want to position the axis, you may think that A1 is only two degrees from A359. But if you are cutting, together with possible movements in other axes, they are definitely 358 degrees apart. If that's what the g-code says.
[AXIS_A]
MAX_VELOCITY = 50
MAX_ACCELERATION = 1200
MIN_LIMIT = -9999999
MAX_LIMIT = 9999999
[JOINT_3]
TYPE = ANGULAR
G10 L20 P#5220 A[[[#5423+180] MOD 360] -180]
If you just want to position the axis, you may think that A1 is only two degrees from A359. But if you are cutting, together with possible movements in other axes, they are definitely 358 degrees apart. If that's what the g-code says.
The following user(s) said Thank You: Mecanix
Please Log in or Create an account to join the conversation.
- Aciera
- Away
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
16 Jan 2024 14:25 #290872
by Aciera
Replied by Aciera on topic [4th axis] How do you set-up your rotary axis?
For truly unlimited rotation you can also use:
MIN_LIMIT = -1e99
MAX_LIMIT = 1e99
MIN_LIMIT = -1e99
MAX_LIMIT = 1e99
Please Log in or Create an account to join the conversation.
- Mecanix
- Offline
- Platinum Member
Less
More
- Posts: 446
- Thank you received: 216
16 Jan 2024 20:21 #290903
by Mecanix
Logic for cam postp, in case it helps anyone:
Replied by Mecanix on topic [4th axis] How do you set-up your rotary axis?
Ah, ok, I see. I admit that is a clever hack to that eternal and weird unwinding issue. With that 'unlimited' suspicion I had I hacked up something similar in post/tcl yesterday (had too) but that G10 ending you've thrown here is for The WIN! and what fix it at the controller end. Thank You So So Much. And pardon my lack of lcnc voodoo skillset, I'm used to old school modulo and DPM hidden inside those industrial ctrl (sinumerik -360 ~ 360) in my case.
[/code]Reset of position at the end of every g-code program [code]G10 L20 P#5220 A[[[#5423+180] MOD 360] -180]
Logic for cam postp, in case it helps anyone:
#------------------------------------------------------
proc MOM_end_of_program_LIB_ENTRY {position} {
#------------------------------------------------------
switch -- $position {
"start"
{
if { [ info exists ::last4thpos ] } {
if [EQ_is_equal $::last4thpos 0] {
### do nothing
set mom_rot_ang_4th 0
} elseif { ([expr $::last4thpos <= 180]) } {
set mom_rot_ang_4th [ expr $::last4thpos - fmod($::last4thpos, 360) ]
} elseif { ([expr $::last4thpos > 180]) } {
set mom_rot_ang_4th [ expr $::last4thpos + fmod(360, $::last4thpos) ]
}
} else {
### do nothing
set mom_rot_ang_4th 0
}
### Output rotary return using recalculted modulo angle
MOM_output_literal "G0 A$mom_rot_ang_4th"
###Ref: https://forum.linuxcnc.org/38-general-linuxcnc-questions/51373-4th-axis-how-do-you-set-up-your-rotary-axis#290869
MOM_output_literal "G10 L20 P#5220 A\[\[\[#5423+180\] MOD 360\] -180\]"
}
}
}
#------------------------------------------------------
Please Log in or Create an account to join the conversation.
- Mecanix
- Offline
- Platinum Member
Less
More
- Posts: 446
- Thank you received: 216
16 Jan 2024 20:28 #290904
by Mecanix
Replied by Mecanix on topic [4th axis] How do you set-up your rotary axis?
Ok, I will. Baby steps into this for now, that's next-level stuff... I'm barely able to set-up rotary motion for now. Once I get this sorted I'll get into this "advanced" voodoo and report back.Generally I would suggest to have a look at a sim config with a rotary and check things out that way. For example:
'configs/sim/axis/vismach/5axis/table-dual-rotary'
Please Log in or Create an account to join the conversation.
Time to create page: 0.079 seconds