584,808 active members*
5,158 visitors online*
Register for free
Login
Results 1 to 14 of 14
  1. #1
    Join Date
    Nov 2015
    Posts
    16

    offset turning macro?

    Hi all,

    I would like some advice on how you would program an 'incline off center' using a turning tool. When I first looked at the video I thought it could only have been done using some sort of software, but after looking at the spindle rotating it looks to me there is a definite synchronisation between the turning tool and spindle rotation that at first seemed easy enough to do which set off the challenger inside me to find out how to do it! On the link of the star video, it is described as 'helical interpolation turning', which I had never heard of before. it seemed easy but once I started to think how to do it I just confused myself silly!

    (done on an St-38 star)

    https://www.youtube.com/watch?v=r_LcY7Q8X0w - (done on an M32)


    I've had ago myself at how I think the program/macro should look but would like someone who knows how or a better understanding of the principles of offset turning to have a look through my attempt first. this is would be a macro program to suit a star sliding head machine and wont do an off-centre taper like the videos. (haven't tried it on a machine)

    T200 (OFFSET TURN)
    M5
    M8
    G0 X32.75 Z-1.0 C0.0 T2
    G1 X31.75 Z-0.4 F0.2

    (INPUT THESE VARIABLES TO SUIT)

    #100 = -0.4 (COUNTER) (Z START POSITION)
    #101 = 10.0 (Z LENGTH REQUIRED)
    #102 = 25.4 (OFFSET TURNED DIAMETER)
    #103 = 5.0 (OFF-CENTER AMOUNT)
    #104 = [#102 + #103] (HYPTOTHETICAL BAR DIAMETER)
    #105 = 0.2 (INCREMENTAL Z MOVE)
    #106 = 0.0 (OPTIONAL C-AXIS START POSITION)


    G28 H0.0
    G0 C#106
    G50 C0.0

    G1 G98 F400

    G112 (POLAR ON)

    WHILE [#100 LT #101] DO 1
    G3 X-#102 C0.0 R[#102/2] W#105
    G3 X#104 C0.0 R[#102/2] W#105
    #100 = [#100 + [#105 + #105]] (CALCULATE CURRENT Z DISTANCE)
    IF [#101 - #100] LE [#105 + #105] THEN #105 = [[#101-#100]/2] (CALCULATE FINAL PASSES)
    END 1

    (CLEAN FACE AT DEPTH REQUIRED)

    G3 X-#102 C0.0 R[#102/2]
    G3 X#104 C0.0 R[#102/2]

    G113 (CANCEL POLAR)

    G1
    G0 X40.0
    G97
    T0
    M1

    am I on the right track or miles apart?


    thanks in advice guys, any input will be greatly appreciated

  2. #2

    Re: offset turning macro?

    Hmm, I have programmed things similar to this but I programmed it in 4-axis cartesian coordinates rather than polar.



    Attachment 310572
    Attachment 310574
    Attachment 310576


    I am not sure how it might be done using G112 as the machines I regularly use don't have it. Hopefully someone else here has some better information because I'd love to see it too

  3. #3
    Join Date
    Jul 2003
    Posts
    1220

    Re: offset turning macro?

    Hi, unable to confirm your macro, but if I have the dimensions correct, I think??? the G03 X-#102 value should be -15.4 and the G03 X#104 should be 35.4
    Attached drawing as my understanding.

  4. #4
    Join Date
    Nov 2015
    Posts
    16

    Re: offset turning macro?

    hi guys, thanks for your input so far

    kiwi, at first I didn't understand where you were coming from and how you got your dimension, but looking again I think I get you and where your coming from.

    Having looked back at my macro I have seen errors anyway. the hypothetical bar diameter is wrong. for a 1" offset tuned diameter, 5mm off center out of 31.75mm bar, the hypothetical bar diameter should be 33.58mm. I don't know how to get that as a macro variable yet, I used draftsight to get the points.

    As I understand offset tuning, the turning tool has to follow the profile of the offset turned diameter, so I have re-written my macro in with absolute points. it will be easier to write the proper macro if I know this will work.

    the re-worked 'macro' I think this will create a 1" offset turned diameter 5mm off center in 31.75mm bar.


    T200 (OFFSET TURN)
    M5
    M8
    G0 X32.75 Z-1.0 C0.0 T2
    G1 X7.7 Z-0.4 F0.2 (X7.7 = top of offset turned diameter)

    (INPUT THESE VARIABLES TO SUIT)

    #100 = -0.4 (COUNTER) (Z START POSITION)
    #101 = 10.0 (Z LENGTH REQUIRED)
    #104 = 33.58 (HYPTOTHETICAL BAR DIAMETER)
    #105 = 0.2 (INCREMENTAL Z MOVE)
    #106 = 0.0 (OPTIONAL C-AXIS START POSITION)


    G28 H0.0
    G0 C#106
    G50 C0.0

    G1 G98 F400

    G112 (POLAR ON)

    WHILE [#100 LT #101] DO 1
    G3 X-33.58 C0.0 R[12.7] W#105
    G3 X7.7 C0.0 R[12.7] W#105
    #100 = [#100 + [#105 + #105]] (CALCULATE CURRENT Z DISTANCE)
    IF [#101 - #100] LE [#105 + #105] THEN #105 = [[#101-#100]/2] (CALCULATE FINAL PASSES)
    END 1

    (CLEAN FACE AT DEPTH REQUIRED)

    G3 X-33.58 C0.0 R[12.7]
    G3 X7.7 C0.0 R[12.7]

    G113 (CANCEL POLAR)

    G1
    G0 X40.0
    G97
    T0
    M1


    I have my draftsight calcs as a jpeg file but cant seem to upload them atm.

    thanks again

  5. #5
    Join Date
    Nov 2015
    Posts
    16

    Re: offset turning macro?

    Attachment 310998

    here is the draftsight calcs attached

  6. #6
    Join Date
    Jul 2003
    Posts
    1220

    Re: offset turning macro?

    Unable to download your attachment.
    Please post picture of your drawing.

  7. #7
    Join Date
    Nov 2015
    Posts
    16

    Re: offset turning macro?

    draftsight calcs
    Attachment 311150

  8. #8
    Join Date
    Jul 2003
    Posts
    1220

    Re: offset turning macro?

    Unable to see how the 7.7 is the centre of the bar. The 7.7 is the balance of 12.7 (radius of the offset turned diameter) less the 5 offset.
    I also can not see how 33.58 is large enough as the radius needs to be 12.7 plus the 5 offset. 17.7 * 2 = 35.4.

  9. #9
    Join Date
    Nov 2015
    Posts
    16

    Re: offset turning macro?

    Quote Originally Posted by Kiwi View Post
    Unable to see how the 7.7 is the centre of the bar. The 7.7 is the balance of 12.7 (radius of the offset turned diameter) less the 5 offset.
    I also can not see how 33.58 is large enough as the radius needs to be 12.7 plus the 5 offset. 17.7 * 2 = 35.4.

    Hi Kiwi, Yes you're completely right, the 7.7 isn't the center of the offset diameter, it's the 'top' 'X' value of the offset diameter. it represented the difference between the top of the offset diameter and the center of the concentric circle minus the offset. 12.7-5 = 7.7. I know what I mean if you don't haha

    I haven't tried offset turning before on a cnc machine and have got confused by my drawing and polar coordinate working out...my fault! Sorry I see where I've gone wrong and where you're coming from. I'm still not entirely sure though if this will work in the machine and crash into the bar.

    I have never worked on vertical machining centers but my way of working polar interpolation coordinates is to draw the points on an standard X/Y graph then convert all y moves to c and double all x moves.

    So in this example, the 7.7 would become 15.4, and the other X value should be 35.4 like you said.

    thank you for your time and patience!

  10. #10
    Join Date
    Sep 2019
    Posts
    3
    I need ncfile encentric please help cnc swiss lathe 4mm rod 1mm depth encentric

  11. #11
    Join Date
    Feb 2011
    Posts
    353

    Re: offset turning macro?

    just asking but g112 changes y axis to c axis for milling will it work with the c and y axis programed at the same time ?
    by using the g112 would the plane need to be changed from g18 to g17 (x/y plane ) to use the arc value (G3 X-33.58 C0.0 R[12.7] W#105 ) ?
    my thinking on this is that you would need to be in c axis but not g112 and move the x/y/z co-ordinated with the c axis
    I was told be a machine tool distributor that the doosan lynx2100 lsya (y axis ) could do this but would need a good cam system
    Me i would like to see a program developed by a cam software ( just a couple of arcs around the part) to see what is happening with the x/y/z/c axis's
    at this time i think it could be done with a while / do statement and a macro program of 1 revolution around the part then when the z axis completes the travel the while/ do statement is done
    The citizen swiss have an eccentric turning option that works with a macro they have developed

  12. #12
    Join Date
    Jun 2015
    Posts
    4131

    Re: offset turning macro?

    hy rcs you could use a software, or write g-code, etc : if the function is not inside the controller, then it will all be in vain

    whatever the programing method, it all comes in the end to how the cnc behaves among a toolpath with many small segments, that are literally such small, that the cnc can't reach programmed feed

    for complex 3d shapes, the segments may be really small ( their length is close to, or even smaller than in_position tolerance ); such a case will succumb the cnc

    if the special cnc function is there, then it simply smooths out the movement :
    ... okuma 5th axis : supernurbs
    ... okuma lathes : cam function ( optimizes xs, and uses a lighter turret )
    ... citizen gang : tool gang is not heavy, thus it can be 'handled' more easy by the servos

    depending on shape, is not a must to have y axis, thus a simple excentric circle can be generated only with x

    if the special function is not there :
    ... i once heared a rumor that is possible to obtain an excentric shape by using a threading cycle
    ... i once tried to turn a hexagon, by using the c axis; it worked, like i did obtained a shape close to a hexagon, but the axis couldn't deliver constant rpm, but it was more like agrresively accelerating and decelerating for each side, thus there were 6 shocks during each full spindle revolution; the insert couldn't resist, and it was not possible to smooth out the motion

    a particular case is that of coding directly the movement for cnc's controlled through linux, but i don't know to what extent

    I was told be a machine tool distributor that the doosan lynx2100 lsya (y axis ) could do this but would need a good cam system
    if you wish, we could test your machine, thus at least i can help with generating the segmentation; however, before thinking about a good cam, i would ask what g or m should be used in order to control the spindle phase in relation to turret position; any machine tool distributor that has an application enginner should be able to give exact infos about the required code, or a program sample, or anything, just to show you that your machine can actually do it / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  13. #13
    Join Date
    Feb 2011
    Posts
    353

    Re: offset turning macro?

    Deadlykitten my understanding of the eccentric turning process is that you need to keep the tool centered on the eccentric turned area at all times to machine it's dia.
    this would be extereme
    if the part had a 1.000 dia material with an eccentric shaft .250 in dia. offset .3750 the y axis would have to move from a +.750 dia.to a -.750 dia. to keep the tool on center
    slight offsets the tool center maybe acceptable but as you get off center the tool will not cut a true diameter as the tool will be over / under center making the tool path .different than the programmed dia. ( an out of round condition)
    turning a hex is a simple macro to write as this can be done in g112 programming x/y co ordinates y is converted to c axis with the tool tip remaining on center the question like you said is can the insert withstand the abuse ?
    I could have asked for an example of the programming but the job the question was for hasn't materialized as of yet and may not

  14. #14
    Join Date
    Jun 2015
    Posts
    4131

    Re: offset turning macro?

    hello again rcs

    yes, indeed, for best results, tooltip has to move up&down in y, folowing the excentric shape

    if you use only x, then :
    ... this does not mean that you won't cut a true round diameter; actually, you could check, for a specific type of insert, what is the maximum excentric diameter that it can cut without interference (*)
    ... it doesn't mean that y is 0, but that y is constant, so you could check, for a specific type of insert, what is the max exc dia that it can cut, for a given constant y <> 0 (*)
    ... surface roughness may vary with spindle phase, and the variation is higher as the excentric diameter increases

    (*) finding the limit for those cases can be done with a simple skecth and a bit of math; however, this result is limited, because it uses a single cut point, that is the sharp tip of the insert, thus math is done considering that the insert cuts at it's highes point; if the insert type is changed to a full radius type, then it will be able to deliver better results, because cutting no longer occurs at the highest insert point, but on an arch among the cutting edge

    for all such cases, like always moving in y&x or only moving in x ( with y constant, 0 or <>0 ), using a fix cutting point ( like a standard sharp tip ) or among an arch (like a rotated full radius groove tool ), i can check inteferences and generate segmentation, but it is in vain, since the cnc can't reproduce it without the special function; only hope is to use the c axis that delivers a better result ( also coding is simpler ), but still far from what is needed; however, a well timed threading cycle seems able to deliver a result that is really close to what is needed, but at this point, i don't know how to do that ( pls check video below )

    so far, i have delivered a worm similar to the one from the below video using c&x axis, without y axis, even if y axis was there; thus i chosed to avoid using y, only to see that it works, and it worked; of course, there are motion variations among each spindle phase, but not as strong as when turning a hex ( insert abuse increases with excentricity, and with a shape that is far from being round ); by the way, the video is about a doosan lynx 220, so yes, something can be done

    I could have asked for an example of the programming but the job the question was for hasn't materialized as of yet and may not
    if you wish to experiment, then just ask, at least to have an idea; is there something i can help you with ? kindly


    Okuma cam turning - YouTube


    eccentric worm drive turning on a Doosan Lynx 220 LY - YouTube
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. Macro b work offset
    By Cannon in forum Fanuc
    Replies: 18
    Last Post: 05-20-2012, 10:52 AM
  2. Macro and Z fixture offset
    By Techman in forum Fadal
    Replies: 0
    Last Post: 08-06-2009, 07:56 PM
  3. Sinumeric Offset Value macro
    By sanjeevlj in forum Mastercam
    Replies: 3
    Last Post: 05-06-2009, 11:05 AM
  4. tool offset macro
    By cnc-king in forum Fanuc
    Replies: 6
    Last Post: 09-22-2008, 04:43 AM
  5. Macro for positive offset
    By qmas99 in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 02-12-2006, 04:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •