Jogging at a certain angle (lathe mode)?
- MRx
- Offline
- Senior Member
Less
More
- Posts: 46
- Thank you received: 2
22 Sep 2022 18:15 - 22 Sep 2022 18:29 #252578
by MRx
Jogging at a certain angle (lathe mode)? was created by MRx
Hi,
I wonder is it possible to jog at a certain angle with linuxcnc in lathe mode?
That would be a nice feature in order to avoid the compound on a cross slide for prototyping.
I guess the pendant signals would have to go through some user comp which would re-calculates the absolute coordinates.
Did anyone do some work in that area already?
it should be fairly easy to implement I think, calculating cos and sine at a particular angle and forwarding the adjusted values
I wonder is it possible to jog at a certain angle with linuxcnc in lathe mode?
That would be a nice feature in order to avoid the compound on a cross slide for prototyping.
I guess the pendant signals would have to go through some user comp which would re-calculates the absolute coordinates.
Did anyone do some work in that area already?
it should be fairly easy to implement I think, calculating cos and sine at a particular angle and forwarding the adjusted values
Last edit: 22 Sep 2022 18:29 by MRx.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7760
- Thank you received: 2055
23 Sep 2022 02:39 #252595
by cmorley
Replied by cmorley on topic Jogging at a certain angle (lathe mode)?
This might be helpful for study.
github.com/LinuxCNC/linuxcnc/blob/master...c/motion/simple_tp.c
github.com/LinuxCNC/linuxcnc/blob/master/src/emc/motion/axis.c
github.com/LinuxCNC/linuxcnc/blob/master...c/motion/simple_tp.c
github.com/LinuxCNC/linuxcnc/blob/master/src/emc/motion/axis.c
Please Log in or Create an account to join the conversation.
- MRx
- Offline
- Senior Member
Less
More
- Posts: 46
- Thank you received: 2
27 Sep 2022 04:24 #252827
by MRx
Replied by MRx on topic Jogging at a certain angle (lathe mode)?
well simple_tp does single axis jogging only, so one option would be to inject the jog data into the trajectory planner command path eg. by using tpAddLine and setting the motion_state to EMCMOT_MOTION_COORD.
I still don't have enough overview about that linuxcnc code, but so far jogging at a certain angle works for me (I use 45° hardcoded at the moment).
X/Z of the pendant should be used for regular jogging
A/B for simulated cross-slide moves (A jog distance, B jog angle)
I still have some problems syncing the keyboard jog position with the pendant jog position but I guess I'll figure that out today.
I still don't have enough overview about that linuxcnc code, but so far jogging at a certain angle works for me (I use 45° hardcoded at the moment).
X/Z of the pendant should be used for regular jogging
A/B for simulated cross-slide moves (A jog distance, B jog angle)
I still have some problems syncing the keyboard jog position with the pendant jog position but I guess I'll figure that out today.
Please Log in or Create an account to join the conversation.
- arvidb
- Offline
- Platinum Member
Less
More
- Posts: 512
- Thank you received: 158
27 Sep 2022 08:16 #252836
by arvidb
This is a neat idea, I like it!
Perhaps you could write a hal component to set the axis.L.jog-scale(s) according to the required angle? So if your overall jog scale is set to 0.1 mm/count for instance, and your angle is set to 30°, the component would set axis.z.jog-scale to 0.1×sin(30) and axis.x.jog-scale to 0.1×cos(30).
The component could easily be made to have its own "count" input pin for setting the required angle. Not sure how to display the set angle though, I guess using a custom gladeVCP panel?
(Trying to modify the motion code or motion planner to do this seems a bit heavy-handed IMO... and not easy to get right!)
Replied by arvidb on topic Jogging at a certain angle (lathe mode)?
X/Z of the pendant should be used for regular jogging
A/B for simulated cross-slide moves (A jog distance, B jog angle)
This is a neat idea, I like it!
Perhaps you could write a hal component to set the axis.L.jog-scale(s) according to the required angle? So if your overall jog scale is set to 0.1 mm/count for instance, and your angle is set to 30°, the component would set axis.z.jog-scale to 0.1×sin(30) and axis.x.jog-scale to 0.1×cos(30).
The component could easily be made to have its own "count" input pin for setting the required angle. Not sure how to display the set angle though, I guess using a custom gladeVCP panel?
(Trying to modify the motion code or motion planner to do this seems a bit heavy-handed IMO... and not easy to get right!)
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7760
- Thank you received: 2055
27 Sep 2022 12:44 #252856
by cmorley
Replied by cmorley on topic Jogging at a certain angle (lathe mode)?
The problem there is the jogs are not coordinated - particularity if they have different acceleration rates.
Wold we need a multi axis simpe tp ?
Wold we need a multi axis simpe tp ?
The following user(s) said Thank You: arvidb
Please Log in or Create an account to join the conversation.
- MRx
- Offline
- Senior Member
Less
More
- Posts: 46
- Thank you received: 2
27 Sep 2022 19:19 #252883
by MRx
Replied by MRx on topic Jogging at a certain angle (lathe mode)?
Maybe just adapt the existing infrastructure and re-use MOTION_COORD (that was my initial approach and worked to some degree ..)
Simple_TP serves its purpose well / independent Axis jogging. Possibly feeding simple_tp with correct parameters should work too (eg. use the slowest axis acceleration as reference instead of independent parameters).
Using simple_tp was my first approach but resulted in a jerky movement at that time I did not check for using common acceleration parameters.
Simple_TP serves its purpose well / independent Axis jogging. Possibly feeding simple_tp with correct parameters should work too (eg. use the slowest axis acceleration as reference instead of independent parameters).
Using simple_tp was my first approach but resulted in a jerky movement at that time I did not check for using common acceleration parameters.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7760
- Thank you received: 2055
28 Sep 2022 04:57 #252912
by cmorley
Replied by cmorley on topic Jogging at a certain angle (lathe mode)?
I would think you would need to rewite simple tp for multiple coordinated axes.
But as you inferred the TP is exactly that.
I don't know why the TP is not used for jogging - that would be an interesting question to get answered. My guess is because it was easier.
But as you inferred the TP is exactly that.
I don't know why the TP is not used for jogging - that would be an interesting question to get answered. My guess is because it was easier.
Please Log in or Create an account to join the conversation.
- arvidb
- Offline
- Platinum Member
Less
More
- Posts: 512
- Thank you received: 158
28 Sep 2022 07:48 #252917
by arvidb
Replied by arvidb on topic Jogging at a certain angle (lathe mode)?
Full trajectory planning and jogging needs different kinds of planning: TP needs to be able to (pre-)blend segments, while simple_tp needs to be able to re-plan in realtime, handling nonzero initial conditions (acc, vel).I don't know why the TP is not used for jogging - that would be an interesting question to get answered. My guess is because it was easier.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7760
- Thank you received: 2055
01 Oct 2022 17:27 #253190
by cmorley
Replied by cmorley on topic Jogging at a certain angle (lathe mode)?
Well I assumed the TP would need additional code to do jogging.
The two jobs are not that far apart. setting an MDI G1 X1 f1 and then aborting is very similar to a keyboard jog.
The two jobs are not that far apart. setting an MDI G1 X1 f1 and then aborting is very similar to a keyboard jog.
Please Log in or Create an account to join the conversation.
- RotarySMP
- Offline
- Platinum Member
Less
More
- Posts: 1453
- Thank you received: 526
02 Oct 2022 09:42 #253234
by RotarySMP
Replied by RotarySMP on topic Jogging at a certain angle (lathe mode)?
The Fanuc control on the Schaublin 125-CCN has something like that implemented, so you can set an angle and then use the jog wheel to move along the angle.
The following user(s) said Thank You: vmihalca
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds