Page 3 of 3 FirstFirst 123
Results 25 to 26 of 26

Thread: parametric program for spiral helical interpolation

  1. #25
    Registered
    Join Date
    Dec 2005
    Location
    usa
    Posts
    42
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by fordav11 View Post
    there are many G-code gurus here but you'll be lucky to find any Fanuc G-code programmer who is interested in Siemens/Heidenhain.
    I wrote something like this (internal tapered thread milling) in Fanuc macro for a Fanuc 6M mill that didn't have helical interpolation about 25 years ago as an apprentice in about 20 lines..... much much easier to understand and far less complicated. Maybe I'll post it if there's interest.
    Why is that that a fanuc programmer wouldn't be interested in Siemens/Heidenhain?

    If you have a 20 line program please post it would like to see how easy it is.


  2. #26
    Registered
    Join Date
    Dec 2005
    Location
    usa
    Posts
    42
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by sinha_nsit View Post
    See the attachment for a simple algorithm.
    The given program would not work on your control, however.
    Here is a quick translation of your supplied program written in HDH.

    0 BEGIN PGM VAR-RAD MM
    1 Q20 = 10 ;NUMBER OF TURNS
    2 Q19 = 50 ;START RADIUS
    3 Q8 = 40 ;END RADIUS
    4 Q7 = 30 ;TOTAL DEPTH
    5 Q1 = 45 ;START ANGLE X AXIS
    6 Q17 = 1 ;INCREMENT IN ANGLE
    7 Q9 = 60 ;FEEDRATE
    8 ;
    9 FN 12: IF +Q19 LT +0 GOTO LBL "ERROR" ; (NEGATIVE START RADIUS)
    10 FN 12: IF +Q8 LT +0 GOTO LBL "ERROR" ; (NEGATIVE END RADIUS)
    11 FN 12: IF +Q20 LT +0 GOTO LBL "ERROR" ; (NEGATIVE NUMBER OF TURNS)
    12 ;
    13 FN 18: SYSREAD Q50 = ID270 NR1 IDX1 ; (Current X-position determined)
    14 FN 18: SYSREAD Q51 = ID270 NR1 IDX2 ; (Current Y-position determined)
    15 FN 18: SYSREAD Q52 = ID270 NR1 IDX3 ; (Current Z-position determined.
    16 Q53 = Q50 - Q19 * COS ( Q1 )
    17 Q54 = Q51 - Q19 * SIN ( Q1 )
    18 Q55 = Q17 ;
    19 Q56 = Q55 ;
    20 ;
    21 LBL "BEGIN"
    22 Q61 = ABS Q56
    23 Q62 = 360 * Q20
    24 FN 9: IF +Q61 EQU +Q62 GOTO LBL "END"
    25 FN 12: IF +Q61 LT +Q62 GOTO LBL "END"
    26 Q57 = Q19 ( ( Q19 - Q8 ) * ABS Q56 / ( 360 * Q20 ) )
    27 Q58 = Q53 + Q57 * COS ( Q1 + Q56 )
    28 Q59 = Q54 + Q57 * SIN ( Q1 + Q56 )
    29 Q60 = Q52 + ( Q7 * ABS Q56 / ( 360 * Q20 ) )
    30 L X+Q58 Y+Q59 Z+Q60 FQ9
    31 Q56 = Q56 + Q55
    32 FN 9: IF +0 EQU +0 GOTO LBL "BEGIN"
    33 ;
    34 LBL "ERROR"
    35 ;ERROR IN PROGRAM
    36 STOP
    37 LBL "END"
    38 END PGM VAR-RAD MM
    Last edited by hansdie; 01-01-2012 at 06:05 PM. Reason: mistake with "end" q parameter


Page 3 of 3 FirstFirst 123

Similar Threads

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

Posting Permissions


 


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.