Lathe Rigid tapping G33.1 with tailstock as W axis

More
07 Jan 2020 16:01 - 07 Jan 2020 16:02 #154219 by alkabal
Hi

My name is Aurelien from France.

Sorry to ask here, i'm machinekit user but i does not foud help or information from machinekit group untill now, and i think you have do much work for CNC feature.
I knwo that the code is now many different but for this parts i have check and "all" seems to be the same.


I have a lathe (mechanicca cortini H105s) and i have retrofited this one with some beaglebone, driver new stepper etc.

The things that make me asking help is the manual tailstock changed as motorised stepper tailstock.

major settings :

[DISPLAY]
DISPLAY = axis
LATHE = 1
GEOMETRY = XZW

[TRAJ]
COORDINATES = X Z W
AXES = 9
JOINTS = 2

# W axis
[AXIS_8]
TYPE = LINEAR

Tailstock seems to work fine for standard command.

But i have do some test for show what is work and not work (turning speedle manually and simulating spindle-at-speed to 1) :

-G33 W-15.5 K1 work like a charm in G18 so is ok

-G33.1 W-15.5 K1 does nothing (i can see in Axis GUI after other command the status is like "run program" but this one change nothing)

-G73 W-15.5 R-10 Q1 need to be in G17.1 plane : lathe with XZW ????

-G81 G82 G83 need to be in G17.1 plane : lathe with XZW ????

-G76 "cannot move rotary axes with G76" off course this is fully out of interest for a lathe with W, but W is linear and i have do this only for test all synchronised stuff^^

I have check source code for G33.1 and i have see some difference vs G33 regarding to parsing value
I have try to patch all the needed file in /src/emc/: now i can see in Axis GUI the status is like "run program" but motor don't move.
After more check in the source tree i think also need to patch some other file like tc.c tp.c but i have some trouble understanding how to do this for stuff like "xyz/uVec" any help are welcome.
github.com/LinuxCNC/linuxcnc/blob/368e2f...src/emc/tp/tc.c#L395


Unfortunatly i think they are other problem, i have read that is not possible for a lathe to wait spindle at 0 rpm before reversing direction or maybee this is not an issue for the stuff i likle to add ???

groups.google.com/forum/#!searchin/machi...r83-dXY/59B3pXN_GQAJ
en.industryarena.com/forum/reverse-lathe-turn-m3-m4--67203.html
forum.linuxcnc.org/26-turning/32523-lathe-rigid-tapping-g33-1


I really like to know what do you think about that ?

Br, and happy new year to all.
Last edit: 07 Jan 2020 16:02 by alkabal.

Please Log in or Create an account to join the conversation.

More
07 Jan 2020 23:06 #154279 by alkabal
Hi

attached tc.c and tp.p patched but can't compile becaus error :
emc/tp/tc.c: In function ‘tcGetStartTangentUnitVector’:
emc/tp/tc.c:208:41: error: ‘PmCartesian {aka const struct <anonymous>}’ has no m                                                                                               ember named ‘uVec’
             *out=tc->coords.rigidtap.uvw.uVec;
                                         ^
emc/tp/tc.c: In function ‘tcGetEndTangentUnitVector’:
emc/tp/tc.c:231:52: error: ‘PmCartesian {aka const struct <anonymous>}’ has no m                                                                                               ember named ‘uVec’
             pmCartScalMult(&tc->coords.rigidtap.uvw.uVec, -1.0, out);
                                                    ^
emc/tp/tc.c: In function ‘tcGetPosReal’:
emc/tp/tc.c:305:33: warning: passing argument 1 of ‘pmCartLinePoint’ from incomp                                                                                               atible pointer type [-Wincompatible-pointer-types]
                 pmCartLinePoint(&tc->coords.rigidtap.uvw, progress, &uvw);
                                 ^
In file included from emc/tp/tc.c:19:0:
./libnml/posemath/posemath.h:941:16: note: expected ‘const PmCartLine * const {a                                                                                               ka const struct <anonymous> * const}’ but argument is of type ‘const PmCartesian                                                                                                * {aka const struct <anonymous> *}’
     extern int pmCartLinePoint(PmCartLine const * const line, double len, PmCar                                                                                               tesian * const point);
                ^~~~~~~~~~~~~~~
emc/tp/tc.c: In function ‘pmRigidTapInit’:
emc/tp/tc.c:724:52: error: ‘uvw’ undeclared (first use in this function)
     emcPoseToPmCartesian(start, &start_xyz, &abc, &uvw);
                                                    ^~~
emc/tp/tc.c:724:52: note: each undeclared identifier is reported only once for e                                                                                               ach function it appears in
emc/tp/tc.c:732:20: warning: passing argument 1 of ‘pmCartLineInit’ from incompa                                                                                               tible pointer type [-Wincompatible-pointer-types]
     pmCartLineInit(&tap->uvw, &start_uvw, &end_uvw);
                    ^
In file included from emc/tp/tc.c:19:0:
./libnml/posemath/posemath.h:940:16: note: expected ‘PmCartLine * const {aka str                                                                                               uct <anonymous> * const}’ but argument is of type ‘PmCartesian * {aka struct <an                                                                                               onymous> *}’
     extern int pmCartLineInit(PmCartLine * const line, PmCartesian const * cons                                                                                               t start, PmCartesian const * const end);
                ^~~~~~~~~~~~~~
emc/tp/tc.c:740:36: error: ‘PmCartesian {aka struct <anonymous>}’ has no member                                                                                                named ‘tmag’
     tap->reversal_target = tap->uvw.tmag;
                                    ^
emc/tp/tc.c: In function ‘pmRigidTapTarget’:
emc/tp/tc.c:750:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ befo                                                                                               re ‘->’ token
     double target = tap->xyz.tmag + overrun, tap->uvw.tmag + overrun;

If this can help to point me in the right direction : for now i'm unsure about good sintaxe and don't really know how to change other file like _posemath.c gomath.c

Br
Attachments:

Please Log in or Create an account to join the conversation.

More
08 Jan 2020 17:11 #154321 by alkabal
Hi again.

I'm really unsure about the better way to do that i like because i think the needed patch is out of logic regarding to the files that need to be edited..

I have read something about using double Z axis like some unknow for me "gantry" machine.

maybee this is a better way ???
forum.linuxcnc.org/38-general-linuxcnc-q.../35911-double-z-axis

Please i really like to know some opinion.

Br

Please Log in or Create an account to join the conversation.

More
09 Jan 2020 01:30 #154382 by andypugh
I think you have a fun project here :-)

It is possible that the answer is to create a G33.2 for the W axis, that uses G33 inside a remap first in one direction, then the other.

Or maybe configure your tailstock as a Y axis.

But I can see advantages to your approach of extending the base code to accept more axes.

I think your problem with compilation is that (for whatever reason) XYZ are stored as a unified structure (pmcartesian) but UVW are not.

Please Log in or Create an account to join the conversation.

More
09 Jan 2020 02:16 #154391 by alkabal
Firstly many thanks for the reply !!

I have think and do (before read your message lol) the change for use Y axis and this work like a charm !! (without any need to change plane i can keep G18, all cycle tested ok except unwanted G76)
I have only do a commented a line inside axis.py for not remove the Y jog button.

Using Y is not so beautifull as displayed a W axis but seems to do the whole job nicely.

The remap is maybee a good idea, i need to check it but i think need to remap all other mode and deal with plane i'm also afraid if this is enough regarding to G33.1 source code. (my knowledge is not really big)

Please Log in or Create an account to join the conversation.

More
09 Jan 2020 02:35 - 09 Jan 2020 02:36 #154394 by alkabal

But I can see advantages to your approach of extending the base code to accept more axes.
.

I not fully understand what you think is the best :
1-change all the needed source code for allow to use G33.1
2-change all the needed source code for adding something like G33.2 (i think need the other change like for G33.1 but surely better to separate)
3-do something with remap

I think your problem with compilation is that (for whatever reason) XYZ are stored as a unified structure (pmcartesian) but UVW are not.

First the problem is i don't really understand the code like posmath tc tp and i'm really affraid about doing this as stupid wrong direction because in my head pmcartesian = cartesian = XYZ i don't want to break some logic.
Second i'm affraid (if this is not stupid) about too much hard to do the change

I think you have a fun project here :-)
.

Oh i'm really happy i think this is the first time i read something like this about my cnc project until now !!!

Thanks a lot, Br
Last edit: 09 Jan 2020 02:36 by alkabal.

Please Log in or Create an account to join the conversation.

More
09 Jan 2020 10:19 - 09 Jan 2020 10:21 #154422 by andypugh

I not fully understand what you think is the best :
1-change all the needed source code for allow to use G33.1
2-change all the needed source code for adding something like G33.2 (i think need the other change like for G33.1 but surely better to separate)
3-do something with remap


It depends if you want to fix it for everyone and change LinuxCNC or just make your machine work.

To fix it for yourself only, the simplest thing is to use the Y axis for the tailstock.

To fix it for yourself only and to keep the preview looking good, making a remapped G33.n is the way to go (you can't remap G33.1)
linuxcnc.org/docs/2.7/html/remap/remap.html
Amongst a lot of other info, this shows that G33.2 is available.
You could remap this in G-code to something like:
In the INI
[RS274NGC]
REMAP=G33.2  argspec=uvw ngc=myridgidtap


then create a file "myrigidtap.ngc"
O<myrigidtap> SUB
(store starting UVW)
(note that at this point #<w> is the W-word from the G33.2 command, and #<_w> is the current W position)
#1 = #<_u>
#2 = #<_v>
#3 = #<_w>
G33 U#<u> V#<v> W#<w>
(reverse the spindle)
M4
G33 U#1 V#2 W#3
{spindle back to forwards)
O<myrigidtap> ENDSUB
M2

But if you want to fix it for everyone, then that involves changes to the LinuxCNC source code. And spindle-synched motion is one of the more complicated parts.
Last edit: 09 Jan 2020 10:21 by andypugh.

Please Log in or Create an account to join the conversation.

More
09 Jan 2020 11:43 - 09 Jan 2020 11:45 #154428 by alkabal
Top, i check this remap soon, a lot of thanks

Really i like to change source for everyone i(f this something possible to merge and keep logic) but for now i can't compile correctly, and you think in all way add a G33.2 is better vs only update the G33.1 source code ?

Br
Last edit: 09 Jan 2020 11:45 by alkabal.

Please Log in or Create an account to join the conversation.

More
09 Jan 2020 12:23 #154431 by andypugh
The best solution would be to extend G33.1 to all axes. (you can imagine using a rotary axis to cut a partial worm sector.....)
But it looks like that would be a significant undertaking.

Please Log in or Create an account to join the conversation.

More
09 Jan 2020 14:05 #154440 by alkabal
For now remapping does not work fine :
W is 0
Ask G33.2 W-5 K1 S50 (spindle speed for M3 M4 inside remap)
The initial move is ok, stopping after 5 full spindle revolution (by hand)
the retract wait 5 backwards spindle revolution before start the synchronised move.
I’m afraid about overrun after the initial move if the spindle does not reverse instantly. (I have see something about over range or something like this in the source code)

Br

Please Log in or Create an account to join the conversation.

Moderators: piasdom
Time to create page: 0.160 seconds
Powered by Kunena Forum