588,025 active members*
5,142 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 26
  1. #1
    Join Date
    May 2010
    Posts
    0

    parametric program for spiral helical interpolation

    Hello, I'm new in this forum, and spent 2 hours searching something about parametric program for spiral helical interpolation for HEIDENHAIN and nothing founded...

    I think is not strange need so maybe someone can help me. Will be nice even if you send a "non-parametric" (I mean with fixed values) program!! Or maybe someone knows where I can ask.

    Thank you

  2. #2
    Join Date
    Aug 2009
    Posts
    684
    This program example will cut a 100mm dia hole 50mm deep at XY zero: -

    0 BEGIN PGM 1 MM
    1 TOOL CALL 1 Z S1000
    2 M6
    3 LBL 1
    3 CC X0 Y0 ; DEFINES ORIGIN OF POLAR CO-ORDINATES
    4 L X0 Y0 R0 F5000 M3
    5 L Z0 M8
    6 LP PA0 PR50 RL F500 ; MOVES TO START POINT WITH CUTTER COMP
    7 CP IPA5400 Z-50 DR+ ; COMPLETES 15 REVOLUTIONS. THIS IS THE MAXIMUM ANGULAR MOVEMENT THE CONTROL WILL TAKE ON ONE LINE.
    8 CP IPA360 DR+ ; BOTTOM PASS - MAY OR MAY NOT BE REQUIRED
    9 L X0 Y0 R0
    10 L Z0
    11 LBL 0
    12 STOP M30
    13 END PGM 1 MM

    Notation may not be perfect as its from memory. Obviously values are replaced with Qs if you are making a parametric cycle, and you will need to use some logic functions to work out total angular movement if you require a specific pitch or if you want to specify direction, bottom pass, internal/external options.

    Let us know if you need further clarification (ie if you haven't worked with polar co-ordinates before).

    DP

  3. #3
    Join Date
    May 2010
    Posts
    0
    If I understood right, it's helical but not spiral... I mean is helical tapered (or conical, spiral...is the same) interpolation that I asked.

    Thank you anyway christiandavid. More help?

  4. #4
    Join Date
    Aug 2009
    Posts
    684
    So you need to produce an involute spiral path in 1st & 2nd axis(X&Y) while feeding in 3rd axis(Z)?

    For example to machine a conical surface or tapered thread?

    I know this can be achieved using Incremental Linear Polar commands.

    If you could give me more information on what you need to achieve, I can give an example program (I don't have access to Heidenhain Controller so forgive any mistakes).

  5. #5
    Join Date
    May 2010
    Posts
    0
    Yes, that is what i want.

    I want to mill a hole with helical spiral movement, because is a hole with this end surface (sorry for my limited English).

    And what's your mode? I guess you use "sin" and "cos" functions.

  6. #6
    Join Date
    Aug 2009
    Posts
    684
    Lets make sure we understand each other!

    If you simply need to machine a flat-bottomed hole using a spiral path I suggest you use CYCL DEF 5.0 (Circular Pocket).

    If you are trying to achieve something more I need more explanation.

    DP

  7. #7
    Join Date
    May 2010
    Posts
    0
    I need as you said "an involute spiral path in 1st & 2nd axis(X&Y) while feeding in 3rd axis(Z)".

    I guess the cycle 5 is the same as the new cycle 252. But the surface of the hole I need to mill is tapered.

  8. #8
    Join Date
    Aug 2009
    Posts
    684
    OK, so you can rough machine the hole using drill and/or circular pocket, you just need to finish the sides of the hole to create a tapered hole?

    DP

  9. #9
    Join Date
    May 2010
    Posts
    0
    I want to mill with this interpolation because the next tool is a tapered reamer (this was the word I can't find) and like this the reamer will have the same quantity of material in the sides.

    (I also have a paremetric program for Fagor but doesn't understand totally)

  10. #10
    Join Date
    Aug 2009
    Posts
    684
    What are the dimensions of your reamer? The only tapered reamers I have used were for producing a hole for a tapered dowel pin. These have quite a shallow taper angle and can easily ream out from a parallel drilled hole.


    Anyway, here is an example of how you could approach a conical motion: -

    ; 1st section USER DEFINED PARAMETERS
    Q1=0. ; X POSITION
    Q2=0. ; Y POSITION
    Q3=0. ; INITIAL Z POSITION
    Q4=-50. ; ULTIMATE Z POSITION
    Q5=50. ; INITIAL RADIUS
    Q6=30. ; ULTIMATE RADIUS
    Q7=-2. ; Z FEED PER REVOLUTION (PITCH)
    Q8=180. ; POINTS PER REVOLUTION (CIRCULARITY)
    Q9=100. ; FEEDRATE
    ;
    ; 2nd section CALCULATED PARAMETERS
    Q10=Q4-Q3 ; TOTAL Z SHIFT (-50 in this case)
    Q11=Q10/Q7 ; REVOLUTIONS REQUIRED (25)
    Q12=360./Q8 ; ANGULAR INCREMENT (.1)
    Q13=Q8*Q11 ; TOTAL STEPS REQUIRED (4500)
    Q14=Q6-Q5 ; TOTAL RADIAL SHIFT (-20)
    Q15=Q14/Q13 ; RADIAL INCREMENT (-0.004)
    Q16=Q10/Q13 ; Z INCREMENT (-0.011)
    ;
    L X+Q1 Y+Q2 R0 FMAX ;
    CC IX+0. IY+0. ;
    L Z+Q3 ;
    LP PR+Q5 PA+0. RL FQ9 ;
    ;
    LBL 1 ;
    LP IPR+Q15 IPA+Q11 IZ+Q16;
    Q13=Q13-1. ;
    FN:? IF Q12 GT 0. GOTO (LBL)1 ; I FORGET THE FN NUMBER...
    LBL 0 ;
    L X+Q1 Y+Q2 R0;
    L Z+Q3 FMAX;

    As I said before, I have no access to Heidenhain Controller at the moment so I cannot prove out this program - I believe you have a modern controller so you should be able to input the formulae as I have typed them. You could input Q1-Q9 into your main program then call a sub-program to calculate remaining Qs and perform the motions.

    This is just one way of approaching the problem and you may wish to input the taper ANGLE for your application, rather than the start/finish radius.
    If this is the case you should input a start radius and the angle into the first section - then calculate the finish radius in the second section using trigonometric functions.

    I hope this helps. Remember it is quite basic and is only written to work in one direction. It should be a useful starting point and hopefully, somebody else out there will have some input and/or alternative solutions for you.

    DP

  11. #11
    Join Date
    May 2010
    Posts
    0
    Hi Christinandavid!

    I really thank you very much for the program!! :-))
    There are a couple of thing I don't understand:
    Isn't it Q12=360/Q8=2 (instead of 0.1??)
    And what you use Q12 for?

    And if you discount 1 to Q13, isn't it IF Q13 GT 0. GOTO LBL 1? (instead of Q12??)

    I'm a little confused. Thank you!!

  12. #12
    Join Date
    Aug 2009
    Posts
    684
    You are quite correct. Well done, you passed my test...

    Seriously, I changed my mind halfway through and my wife wanted the computer back, so I got a bit mixed up.

    Let me know if you get it working, or if you spot any other mistakes.

    ; 1st section USER DEFINED PARAMETERS
    Q1=0. ; X POSITION
    Q2=0. ; Y POSITION
    Q3=0. ; INITIAL Z POSITION
    Q4=-50. ; ULTIMATE Z POSITION
    Q5=50. ; INITIAL RADIUS
    Q6=30. ; ULTIMATE RADIUS
    Q7=-2. ; Z FEED PER REVOLUTION (PITCH)
    Q8=180. ; POINTS PER REVOLUTION (CIRCULARITY)
    Q9=100. ; FEEDRATE
    ;
    ; 2nd section CALCULATED PARAMETERS
    Q10=Q4-Q3 ; TOTAL Z SHIFT (-50 in this case)
    Q11=Q10/Q7 ; REVOLUTIONS REQUIRED (25)
    Q12=360./Q8 ; ANGULAR INCREMENT (2.)
    Q13=Q8*Q11 ; TOTAL STEPS REQUIRED (4500)
    Q14=Q6-Q5 ; TOTAL RADIAL SHIFT (-20)
    Q15=Q14/Q13 ; RADIAL INCREMENT (-0.004)
    Q16=Q10/Q13 ; Z INCREMENT (-0.011)
    ;
    L X+Q1 Y+Q2 R0 FMAX ;
    CC IX+0. IY+0. ;
    L Z+Q3 ;
    LP PR+Q5 PA+0. RL FQ9 ;
    ;
    LBL 1 ;
    LP IPR+Q15 IPA+Q12 IZ+Q16;
    Q13=Q13-1. ;
    FN:? IF Q13 GT 0. GOTO (LBL)1 ; I FORGET THE FN NUMBER...
    LBL 0 ;
    L X+Q1 Y+Q2 R0;
    L Z+Q3 FMAX;

  13. #13
    Join Date
    May 2010
    Posts
    0
    Hi!

    Thanks for the reply. I tryed but it doesn't let me to program a LP with a PR, PA and IZ (only PR and PA). LP IPR+Q15 IPA+Q12 IZ+Q16

    Can I do something?

  14. #14
    Join Date
    Aug 2009
    Posts
    684
    OK, so my lazy man's option didn't work. To be honest I have never actually tried that at the machine so it was a long shot...

    It seems that we will have to calculate our polar positions using sine and cosine functions as you originally thought, so this will start getting messy: -

    ; 1st section USER DEFINED PARAMETERS
    Q1=0. ; X POSITION
    Q2=0. ; Y POSITION
    Q3=0. ; INITIAL Z POSITION
    Q4=-50. ; ULTIMATE Z POSITION
    Q5=50. ; INITIAL RADIUS
    Q6=30. ; ULTIMATE RADIUS
    Q7=-2. ; Z FEED PER REVOLUTION (PITCH)
    Q8=180. ; POINTS PER REVOLUTION (CIRCULARITY)
    Q9=100. ; FEEDRATE
    ;
    ; 2nd section CALCULATED PARAMETERS
    Q10=Q4-Q3 ; TOTAL Z SHIFT (-50 in this case)
    Q11=Q10/Q7 ; REVOLUTIONS REQUIRED (25)
    Q12=360./Q8 ; ANGULAR INCREMENT (2.)
    Q13=Q8*Q11 ; TOTAL STEPS REQUIRED (4500)
    Q14=Q6-Q5 ; TOTAL RADIAL SHIFT (-20)
    Q15=Q14/Q13 ; RADIAL INCREMENT (-0.004)
    Q16=Q10/Q13 ; Z INCREMENT (-0.011)
    Q17=0. ; START ANGLE
    ;
    L X+Q1 Y+Q2 R0 FMAX ;
    CC IX+0 IY+0 ;
    L Z+Q3 ;
    LP PR+Q5 PA+0. RL FQ9 ;
    ;
    LBL 1 ;
    Q5=Q5+Q15 ; CURRENT RADIUS
    Q17=Q17+Q12 ; CURRENT ANGLE
    FN:? Q18=COS Q17 ; CURRENT X RATIO
    FN:? Q19=SIN Q17 ; CURRENT Y RATIO
    Q20=Q5*Q18 ; POLAR X
    Q21=Q5*Q19 ; POLAR Y
    Q22=Q21+Q1 ; ACTUAL X
    Q23=Q22+Q2 ; ACTUAL Y
    Q24=Q3+Q16 ; CURRENT Z POSITION
    L X+Q22 Y+Q23 Z+Q24;
    Q13=Q13-1. ;
    FN:? IF Q13 GT 0. GOTO (LBL)1 ;
    LBL 0 ;
    L X+Q1 Y+Q2 R0;
    L Z+Q3 FMAX;

    OK, there is a problem here if you want to do 15+ revolutions. If Q17 is greater than 5400 degrees, machine will alarm out, so we need to reset Q17 to zero at every revolution. Something like this: -

    ;
    LBL 1 ;
    Q17=0. ; START ANGLE
    [B] LBL 0 ;
    ;
    LBL 2 ;
    Q5=Q5+Q15 ; CURRENT RADIUS
    Q17=Q17+Q12 ; CURRENT ANGLE
    FN:? Q18=COS Q17 ; CURRENT X RATIO
    FN:? Q19=SIN Q17 ; CURRENT Y RATIO
    Q20=Q5*Q18 ; POLAR X
    Q21=Q5*Q19 ; POLAR Y
    Q22=Q21+Q1 ; ACTUAL X
    Q23=Q22+Q2 ; ACTUAL Y
    Q24=Q3+Q16 ; CURRENT Z POSITION
    L X+Q22 Y+Q23 Z+Q24;
    Q13=Q13-1. ;
    FN:? IF Q13 EQ 0. GOTO (LBL)3 ;
    FN:? IF Q17 EQ 360. GOTO (LBL)1 ;
    FN:? IF Q13 GT 0. GOTO (LBL)2 ;
    LBL 0 ;
    ;
    LBL 3 ;

    L X+Q1 Y+Q2 R0;
    L Z+Q3 FMAX;
    LBL 0 ;

    I have no idea how many mistakes are in that one, but I am sure you will find them. I don't know the function numbers from memory, you may be able to write the formulae more efficiently on your control and reduce the number of variables (once we have it working correctly).

    Keep us informed of your progress or otherwise!

    DP

  15. #15
    Join Date
    May 2010
    Posts
    0
    Hi Christiandavid!

    Great work, thank you very much again!
    I will check at afternoon here, so i will notice you about that.
    I don't understand totally, but have a doubt, I don't see where you use the Q20. Maybe the next phrases have to be
    Q20=Q5*Q18 ; POLAR X
    Q21=Q5*Q19 ; POLAR Y
    Q22=Q21+Q1 ; ACTUAL X
    Q23=Q22+Q2 ; ACTUAL Y

    Q20=Q5*Q18 ; POLAR X
    Q21=Q5*Q19 ; POLAR Y
    Q22=Q21+Q1 ; ACTUAL X
    Q23=Q22+Q2 ; ACTUAL Y

  16. #16
    Join Date
    May 2010
    Posts
    0
    (i had a problem with the last response)

    have to be Q20-Q21 instead of Q21-Q22?

  17. #17
    Join Date
    Aug 2009
    Posts
    684
    Hi Bastida,

    Yes, you are indeed correct again, I can't get anything past you!

    Q22=Q20+Q1 ; ACTUAL X
    Q23=Q21+Q2 ; ACTUAL Y

    I am surprised you tolerate my woeful assistance, as you continue to correct me...

    If we get this to work lets hope that your machine/controller is fast enough to process it...

    DP

  18. #18
    Join Date
    May 2010
    Posts
    0
    Hi Christiandavid!

    Don't worry because I'm teacher! There is no problem when someone in helping :-))
    This program is for a student (operator) so that's the reason I have no much information about what's for.
    We tried your program, and after a small change, it worked!!! :-))

    LBL 1 ;
    Q5=Q5+Q15 ; CURRENT RADIUS
    Q17=Q17+Q12 ; CURRENT ANGLE
    FN:? Q18=COS Q17 ; CURRENT X RATIO
    FN:? Q19=SIN Q17 ; CURRENT Y RATIO
    Q20=Q5*Q18 ; POLAR X
    Q21=Q5*Q19 ; POLAR Y
    Q22=Q21+Q1 ; ACTUAL X
    Q23=Q22+Q2 ; ACTUAL Y
    Q24=Q3+Q16 ; CURRENT Z POSITION
    L X+Q22 Y+Q23 Z+IQ24;
    Q13=Q13-1. ;
    FN:? IF Q13 GT 0. GOTO (LBL)1 ;
    LBL 0 ;

    We will try the second way tomorrow, but are very happy with this way!

    Thank you very much

  19. #19
    Join Date
    Aug 2009
    Posts
    684
    OK, I think we've got the last bug out of this one - I have realised that Q24=Q3+Q16 does not alter in value with each loop - that's why you needed to alter to incremental (but that has only worked out correctly in this case because we started at Z=0).

    The simplest solution (for both program styles) is it remove Q24 completely and simply enter the following motion: - L X+Q22 Y+Q23 IZ+Q16; It will let you do this, I am sure.


    And that should be it - let me know if you get the 2nd program style working also (alter the pitch/z depth parameters to perform more than 15 revolutions, see what happens). Also check that the 1st program style will cause error/alarm out after 15 revolutions.


    Update: - Ignore the previous paragraph. I have realised that as we are no longer using Polar commands we should not be restricted to 15 revolutions. Carry on using the simpler program as the 2nd program is unnecessary.

    I think we have put this one to bed.

    :bananagroup)

    DP

  20. #20
    Join Date
    May 2010
    Posts
    0
    Yes, you are right, no problem with more than 15 revolutions (your example is 25 rev). I did the changed you said with Q16 and it works!!

    So I think is finished. I end the course the we are happy with the results. You did a great work!

    Thank you again and hope contact each other again :-))

    Until the next thread

Page 1 of 2 12

Similar Threads

  1. helical interpolation
    By Montabelli in forum Mastercam
    Replies: 2
    Last Post: 04-11-2010, 03:34 AM
  2. Helical Interoplation (Spiral Cut)
    By kjm30 in forum G-Code Programing
    Replies: 10
    Last Post: 02-02-2010, 03:29 AM
  3. MV 35/40 Helical Interpolation
    By Millem in forum Uncategorised MetalWorking Machines
    Replies: 2
    Last Post: 12-12-2007, 03:54 PM
  4. Replies: 6
    Last Post: 08-22-2006, 02:47 PM
  5. Helical Interpolation
    By dbcoop11 in forum Bridgeport / Hardinge Mills
    Replies: 4
    Last Post: 12-31-2004, 05:15 PM

Posting Permissions

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