dolphin CAM post help processor needed

Moderators: TomKerekes, dynomotion

turbothis
Posts: 150
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

dolphin CAM post help processor needed

Post by turbothis » Wed Jul 24, 2019 12:36 am

now that my lathe works with Kmotion cnc i cant use the old mach3 PP because of the incremental thing

anyone know the closest PP to choose from there drop down?

i need this code converted over if possible

Code: Select all

N20 G20 G18 G64 G80 G90 M49 G40 G49 
N30 m3s1200
N40 g04p2
N60 M08 
N70 G0 Z0.0 
N100 G97 S1800  
N110 M03 G95 F0.005
N120 G40
N130 G01 X0.28 Z0.0 
N140 G01 X0.26 Z0.0 
N150 X0.26 Z-0.5095 
N160 G02 X0.263 Z-0.52 I0.243 K-0.52 
N170 G01 X0.263 Z-0.6104 
N180 G02 X0.26 Z-0.621 I0.243 K-0.6104 
N190 G01 X0.26 Z-5.5776 
N200 G03 X0.2763 Z-5.5911 I0.3795 K-5.4497 
N210 G02 X0.28 Z-5.5946 I0.2645 K-5.6072 
N220 G01 X0.28 Z-5.7643 
N230 G02 X0.2674 Z-5.7737 I0.2595 K-5.75 
N240 G01 X0.26 Z-5.7762 
N250 X0.26 Z-5.8388 
N260 X0.2674 Z-5.8413 
N270 G02 X0.28 Z-5.8507 I0.2595 K-5.865 
N280 G01 X0.28 Z-6.0343 
N290 G02 X0.2674 Z-6.0437 I0.2595 K-6.02 
N300 G01 X0.26 Z-6.0462 
N310 X0.26 Z-6.1088 
N320 X0.2674 Z-6.1113 
N330 G02 X0.28 Z-6.1207 I0.2595 K-6.135 
N340 G01 X0.28 Z-6.3184 
N350 G02 X0.26 Z-6.3369 I0.2445 K-6.3 
N360 G01 X0.26 Z-6.35 
N370 G00 X0.38 Z-6.35 
N380 X0.38 Z-0.42 f0.009
N390 G01 X0.243 Z-0.42 
N400 G02 X0.24 Z-0.4305 I0.223 K-0.42 
N410 G01 X0.24 Z-0.4979 
N420 X0.2494 Z-0.501 
N430 G02 X0.263 Z-0.52 I0.243 K-0.52 
N440 G01 X0.263 Z-0.6104 
N450 G02 X0.257 Z-0.6247 I0.243 K-0.6104 
N460 G03 X0.24 Z-0.644 I0.3795 K-0.7497 
N470 G01 X0.24 Z-5.5554 
N480 G03 X0.2763 Z-5.5911 I0.3795 K-5.4497 
N490 G02 X0.28 Z-5.5946 I0.2645 K-5.6072 
N500 G01 X0.28 Z-5.7643 
N510 G02 X0.2674 Z-5.7737 I0.2595 K-5.75 
N520 G01 X0.24 Z-5.7829 
N530 X0.24 Z-5.8321 
N540 X0.2674 Z-5.8413 
N550 G02 X0.28 Z-5.8507 I0.2595 K-5.865 
N560 G01 X0.28 Z-6.0343 
N570 G02 X0.2674 Z-6.0437 I0.2595 K-6.02 
N580 G01 X0.24 Z-6.0529 
N590 X0.24 Z-6.1021 
N600 X0.2674 Z-6.1113 
N610 G02 X0.28 Z-6.1207 I0.2595 K-6.135 
N620 G01 X0.28 Z-6.3184 
N630 G02 X0.2572 Z-6.3379 I0.2445 K-6.3 
N640 G01 X0.2545 Z-6.3388 
N650 X0.2545 Z-6.35 
N660 G00 X0.38 Z-6.35 
N670 X0.38 Z-0.439 
N680 G01 X0.2294 Z-0.439 
N690 X0.22 Z-0.4421 
N700 X0.22 Z-0.4912 
N710 X0.2494 Z-0.501 
N720 G02 X0.263 Z-0.52 I0.243 K-0.52 
N730 G01 X0.263 Z-0.6104 
N740 G02 X0.257 Z-0.6247 I0.243 K-0.6104 
N750 G03 X0.22 Z-0.6777 I0.3795 K-0.7497 
N760 G01 X0.22 Z-5.5217 
N770 G03 X0.2763 Z-5.5911 I0.3795 K-5.4497 
N780 G02 X0.28 Z-5.5946 I0.2645 K-5.6072 
N790 G01 X0.28 Z-5.7643 
N800 G02 X0.2674 Z-5.7737 I0.2595 K-5.75 
N810 G01 X0.2203 Z-5.7895 
N820 G03 X0.22 Z-5.79 I0.246 K-5.805 
N830 G01 X0.22 Z-5.825 
N840 G03 X0.2203 Z-5.8255 I0.246 K-5.81 
N850 G01 X0.2674 Z-5.8413 
N860 G02 X0.28 Z-5.8507 I0.2595 K-5.865 
N870 G01 X0.28 Z-6.0343 
N880 G02 X0.2674 Z-6.0437 I0.2595 K-6.02 
N890 G01 X0.2203 Z-6.0595 
N900 G03 X0.22 Z-6.06 I0.246 K-6.075 
N910 G01 X0.22 Z-6.095 
N920 G03 X0.2203 Z-6.0955 I0.246 K-6.08 
N930 G01 X0.24 Z-6.1021 
N940 G00 X0.38 Z-6.1021 
N950 X0.38 Z-0.4421 
N960 G01 X0.22 Z-0.4421 
N970 X0.2 Z-0.4488 
N980 X0.2 Z-0.4845 
N990 X0.2494 Z-0.501 
N1000 G02 X0.263 Z-0.52 I0.243 K-0.52 
N1010 G01 X0.263 Z-0.6104 
N1020 G02 X0.257 Z-0.6247 I0.243 K-0.6104 
N1030 G03 X0.205 Z-0.7368 I0.3795 K-0.7497 
N1040 G01 X0.205 Z-5.4627 
N1050 G03 X0.2763 Z-5.5911 I0.3795 K-5.4497 
N1060 G02 X0.28 Z-5.5946 I0.2645 K-5.6072 
N1070 G01 X0.28 Z-5.7643 
N1080 G02 X0.2674 Z-5.7737 I0.2595 K-5.75 
N1090 G01 X0.2203 Z-5.7895 
N1100 G03 X0.216 Z-5.805 I0.246 K-5.805 
N1110 G01 X0.216 Z-5.81 
N1120 G03 X0.2203 Z-5.8255 I0.246 K-5.81 
N1130 G01 X0.2674 Z-5.8413 
N1140 G02 X0.28 Z-5.8507 I0.2595 K-5.865 
N1150 G01 X0.28 Z-6.0343 
N1160 G02 X0.2674 Z-6.0437 I0.2595 K-6.02 
N1170 G01 X0.2203 Z-6.0595 
N1180 G03 X0.216 Z-6.075 I0.246 K-6.075 
N1190 G01 X0.216 Z-6.08 
N1200 G03 X0.22 Z-6.095 I0.246 K-6.08 
N1210 G00 X0.38 Z-6.095 
N1220 X0.28 Z-6.095 
N1230 X0.28 Z0.0 
N1240 G97 S1400  
N1250 G95 
N1260 X0.5 Z0.0 
N1270 G00 X0.5 Z0.0 G95 
N1280 G97 S1400  
N1290 G95 
N1300 X0.283 Z0.0 
N1310 G41
N1320 G01 X0.233 Z0.0 F0.004 
N1330 X0.233 Z-0.42 
N1340 G02 X0.2262 Z-0.4295 I0.223 K-0.42 
N1350 G01 X0.19 Z-0.4416 
N1360 X0.19 Z-0.4917 
N1370 X0.2462 Z-0.5105 
N1380 G02 X0.253 Z-0.52 I0.243 K-0.52 
N1390 G01 X0.253 Z-0.6104 
N1400 G02 X0.25 Z-0.6176 I0.243 K-0.6104 
N1410 G03 X0.195 Z-0.7364 I0.3795 K-0.7497 
N1420 G01 X0.195 Z-5.463 
N1430 G03 X0.2704 Z-5.5991 I0.3795 K-5.4497 
N1440 G02 X0.2745 Z-5.6072 I0.2645 K-5.6072 
N1450 G01 X0.2745 Z-5.75 
N1460 G02 X0.2643 Z-5.7642 I0.2595 K-5.75 
N1470 G01 X0.214 Z-5.7811 
N1480 G03 X0.206 Z-5.805 I0.246 K-5.805 
N1490 G01 X0.206 Z-5.81 
N1500 G03 X0.214 Z-5.834 I0.246 K-5.81 
N1510 G01 X0.2643 Z-5.8508 
N1520 G02 X0.2745 Z-5.865 I0.2595 K-5.865 
N1530 G01 X0.2745 Z-6.02 
N1540 G02 X0.2643 Z-6.0342 I0.2595 K-6.02 
N1550 G01 X0.214 Z-6.0511 
N1560 G03 X0.206 Z-6.075 I0.246 K-6.075 
N1570 G01 X0.206 Z-6.08 
N1580 G03 X0.214 Z-6.104 I0.246 K-6.08 
N1590 G01 X0.2643 Z-6.1208 
N1600 G02 X0.2745 Z-6.135 I0.2595 K-6.135 
N1610 G01 X0.2745 Z-6.3 
N1620 G02 X0.254 Z-6.3285 I0.2445 K-6.3 
N1630 G01 X0.2445 Z-6.3316 
N1640 X0.2445 Z-6.35 
N1650 G40
N1660 G00 X0.5 Z-6.35 
N1670 G00 X0.5 Z0.0 G95 
; TOOL definition
N1690 G0 Z0.0 
N1700  ( Thread cutting tool )
N1710 M06 T0202 
N1720 G97 S800  
N1730 G95 
N1740 g04p2
N1750 G97 S800  
N1760 G95 
N1770 X0.285 Z0.02 
N1780 X0.235 Z0.02 
N1790 G01 X0.228 Z0.02 F0.05 
N1800 G32 X0.228 Z-0.45 
N1810 G00 X0.285 Z-0.45 G95 
N1820 X0.285 Z0.02 
N1830 X0.235 Z0.02 
N1840 G01 X0.2252 Z0.02 F0.05 
N1850 G32 X0.2252 Z-0.45 
N1860 G00 X0.285 Z-0.45 G95 
N1870 X0.285 Z0.02 
N1880 X0.235 Z0.02 
N1890 G01 X0.223 Z0.02 F0.05 
N1900 G32 X0.223 Z-0.45 
N1910 G00 X0.285 Z-0.45 G95 
N1920 X0.285 Z0.02 
N1930 X0.235 Z0.02 
N1940 G01 X0.2211 Z0.02 F0.05 
N1950 G32 X0.2211 Z-0.45 
N1960 G00 X0.285 Z-0.45 G95 
N1970 X0.285 Z0.02 
N1980 X0.235 Z0.02 
N1990 G01 X0.2194 Z0.02 F0.05 
N2000 G32 X0.2194 Z-0.45 
N2010 G00 X0.285 Z-0.45 G95 
N2020 X0.285 Z0.02 
N2030 X0.235 Z0.02 
N2040 G01 X0.218 Z0.02 F0.05 
N2050 G32 X0.218 Z-0.45 
N2060 G00 X0.285 Z-0.45 G95 
N2070 X0.285 Z0.02 
N2080 X0.235 Z0.02 
N2090 G01 X0.2166 Z0.02 F0.05 
N2100 G32 X0.2166 Z-0.45 
N2110 G00 X0.285 Z-0.45 G95 
N2120 X0.285 Z0.02 
N2130 X0.235 Z0.02 
N2140 G01 X0.2153 Z0.02 F0.05 
N2150 G32 X0.2153 Z-0.45 
N2160 G00 X0.285 Z-0.45 G95 
N2170 X0.285 Z0.02 
N2180 X0.235 Z0.02 
N2190 G01 X0.2141 Z0.02 F0.05 
N2200 G32 X0.2141 Z-0.45 
N2210 G00 X0.285 Z-0.45 G95 
N2220 X0.285 Z0.02 
N2230 X0.235 Z0.02 
N2240 G01 X0.213 Z0.02 F0.05 
N2250 G32 X0.213 Z-0.45 
N2260 G00 X0.285 Z-0.45 G95 
N2270 X0.285 Z0.02 
N2280 X0.235 Z0.02 
N2290 G01 X0.213 Z0.02 F0.05 
N2300 G32 X0.213 Z-0.45 
N2310 G00 X0.285 Z-0.45 G95 
N2320 X0.285 Z0.02 
N2330 X0.235 Z0.02 
N2340 G01 X0.213 Z0.02 F0.05 
N2350 G32 X0.213 Z-0.45 
N2360 G00 X0.285 Z-0.45 G95 
N2370 X0.285 Z0.02 
N2380 X0.235 Z0.02 
N2390 G01 X0.213 Z0.02 F0.05 
N2400 G32 X0.213 Z-0.45 
N2410 G00 X0.285 Z-0.45 G95 
N2420 X0.285 Z0.02 
N2440 G00 X0.5 Z0.0 G95 
N2450 M05 M30 m09
 

turbothis
Posts: 150
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: dolphin CAM post help processor needed

Post by turbothis » Wed Jul 24, 2019 1:58 am

does this look alright?

Code: Select all

TITLE:
    :T1 = {
                MACH3 CNC Milling Controller
            Copyright (c) 2003 Dolphin CADCAM Ltd 
		Modified to remove quadrant splitting in Arcs.   nov 2013   mmm.
          }
END:

WORDS:
       :TMP   =  {DDDDDD.dd}
       :BLOCK =  {"N"DDDD}
       :XAXIS =  {"X"DDDDD.ddd} {"X"DDD.dddd}
       :YAXIS =  {"Y"DDDDD.ddd} {"Y"DDD.dddd}
       :ZAXIS =  {"Z"DDDDD.ddd} {"Z"DDD.dddd}
       :XARC =   {"I"DDDDD.ddd} {"I"DDD.dddd}
       :YARC =   {"J"DDDDD.ddd} {"J"DDD.dddd}
       :DELAY =  {"G04X"DDDDD.ddd}
       :DWELL =  {"P"DDDD.ddd}
       :PECK =   {"Q"DDDDD.ddd} {"Q"DDD.dddd}
       :RPLANE =  {"R"DDDDD.ddd} {"R"DDD.dddd}
       :FEED =   {"F"DDDDD.dddI} {"F"DDD.dddd}
       :SPIN =   {"S"DDDD} 
       :TOOL =   {"T"DD} 
       :SUBPR =  {"P"DDDD} 
       :REPEAT =  {"L"DDDD} 
       :CRC =    {"D"DD} 
       :TLC =    {"H"DD}
       :INDEX = {"INDEX"DDD.ddd}
       :PROGNO = {"O"DDDDD}
END:

GROUPS:
      :G1 = { G00  G01  G02  G03 }
      :G8 = { G73  G74  G76 G80 G81  G82  G83  G84  G85  G86  G87  G88  G89 }
      :G2 = { G17  G18  G19 }
      :G3 = { G90  G91 }
      :G4 = { G94  G95 }
      :G5 = { G20  G21 }
      :G6 = { G40  G41  G42 }
      :G7 = { G43  G44  G49 }
      :G9 = { G98  G99 }
      :G10 = { G54  G55  G56  G57  G58  G59 }
      :M1 = { M00  M01  M03  M04  M05 M06 }
      :M2 = { M98  M99 }
END:

CYCLES:
    DRILL       CANNED
    DRILLDWELL  CANNED
    DEEPDRILL   EXPAND
    NDEEP       CANNED
    NPECK       CANNED
    PECKDRILL   EXPAND
    NPECK       CANNED
    REAM        CANNED
    BORE        CANNED
    TAP         CANNED
    TAPNOREV    EXPAND
    LHTAP       EXPAND
    LHTAPNOREV  EXPAND
    HELIX	VECTOR
END:

MACROS:
    #N =     { $BLOCK:BLOCK
               IF ($BLOCK EQ 9995) THEN SET $BLOCK = 5
               ENDIF }
    #L =     { [RAPID ? (G01) / (G00)]  }
    #FTYPE = { [FEEDTYPE ? (G94) / (G95) ] }
    #X =     { ($X:XAXIS) }
    #Y =     { ($Y:YAXIS) }
    #Z =     { ($Z:ZAXIS) }
    #IINC =     { ($XCEN-$OLDX):XARC }
    #JINC =     { ($YCEN-$OLDY):YARC }
    #IABS =     {  $XCEN:XARC }
    #JABS =     {  $YCEN:YARC }
    #R =     { ($CCLDIST:RPLANE) }
    #P =     { if ( $CDELAY ne 0 ) then ($CDELAY:DWELL) endif }
    #F =     { [RAPID ? [FEEDTYPE ? ($FPM:FEED) / ($FPR:FEED) ] ] }
    #DWELL = { if ($CDELAY ne 0) then (G82) else (G81) endif }
    #DWREM = { if ($CDELAY ne 0) then (G89) else (G85) endif }
    #DWBOR = { if ($CDELAY ne 0) then (G88) else (G86) endif }
    #RAPID = { SET [RAPID] = 2 }
    #FEED  = { SET [RAPID] = 1 }
    #IPLANE = { if ( [CRETRACT] eq 2 ) then
                    (G99)
                else
                    (G98)
                endif }
    #CRCX =   { [CUTCOM ? (G40) / (G41) / (G42)] }
    #CRCNOX = { [CUTCOM ? NULL / ($CRCNO:CRC) / ($CRCNO:CRC) ] }
    #CRC   = { NULL }
    #CRCNO = { NULL }
    #Q     = {  (ABS($CD1):PECK) }

END:

RULES:
     :INIT = {
              SET $USR1 = 0
              SET $USR5 = 2.5
              SET $BLOCK = 1
              set $INCR  = 1
              set $RAPIDFEED = 10000 ; rapid feedrate
              }
    :PARTNO = { "( Produced       :- " $TIME "  " $DATE " )" EOB
                "( CNC File       :- " $CNCNAME " )" EOB
                "( Post Processor :- " $POST " )" EOB
                "( Part Number ID :- " $JOBTEXT " )" EOB
              }
    :XPROGNO = { "%" EOB $PROGNO:PROGNO EOB }
    :UNITS = { #N (G00) [UNITS ? (G21) / (G20)] (G17) (G90)
               (G40) (G49) (G80) EOB
               IF ([UNITS] EQ 1) THEN
                  SET $USR2 = 0.0005
		  set $PRECISION = 0.001
               ELSE
                  SET $USR2 = 0.00005
		  set $PRECISION = 0.0001
               ENDIF
             }

    :STOP = { UNSETALL
              #N (M00) EOB 
            }

    :OPSTOP = { UNSETALL
                #N (M01) EOB
              }

    :PPRINT = { #N $JOBTEXT EOB }

    :RETRACT = { #N (G00) #Z eob }

    :GOTO = {
            SET $USR3 = 0
            IF ((ABS($DELTAX) GE $USR2) OR (ABS($DELTAY) GE $USR2)) THEN
               SET $USR3 = 1
            ENDIF
            IF (($USR3 EQ 1) OR (ABS($DELTAZ) GE $USR2)) THEN
               #N #L #CRC 
               IF ((ABS($DELTAX) GE $USR2) OR (ABS($DELTAY) GE $USR2)) THEN
                  $X:XAXIS $Y:YAXIS
               ENDIF
               IF (ABS($DELTAZ) GE $USR2) THEN
                  #Z
               ENDIF
               #CRCNO #F EOB
            ENDIF
             }

    :GOCLW =  { #N (G02) #CRC #X #Y #Z #IINC #JINC #CRCNO #F eob }

    :GOACLW = { #N (G03) #CRC #X #Y #Z #IINC #JINC #CRCNO #F eob }

    :DELAY  = { #N $DELAY:DELAY eob }

    :SPINDLE = { #N $SPINDLE:SPIN [SPIN ? NULL / (M03) / (M04) ] eob
                 #N #FTYPE EOB  }

    :FINISH = { #N (M09) EOB
                #N (M30) EOB "%" EOB }

    :SELCTL = {
        IF ($USR1 EQ 1) THEN
           #N (M09) EOB
        ENDIF
        SET $USR1 = 1
        UNSETALL
        set $CYCLETIME = $CYCLETIME + 0.5 ; 30 seconds for a tool change
        if ( $Z ne $ZTLOAD ) then
            #N (G00) (G28) $ZTLOAD:ZAXIS eob
            #N (G49) EOB
        endif
        #N (G49) eob
        #N $TOOLNO:TOOL (M06) "  ( " $JOBTEXT " )" eob
        #N (G00) (G43) $CLEARP:ZAXIS $TLCNO:TLC eob }

    :DRILL = { #N #IPLANE #DWELL #X #Y #Z #R 
               IF ($CDELAY NE 0) THEN
                  ($CDELAY:DWELL)
               ENDIF              
               #F eob }

    :BORE =  { #N #IPLANE #DWBOR  #X #Y #Z #R 
               IF ($CDELAY EQ 0) THEN
                  ($USR5:DWELL)
               ELSE
                  ($CDELAY:DWELL)
               ENDIF
               #F eob }

    :REAM =  { #N #IPLANE #DWREM #X #Y #Z #R #F EOB }

    :TAP  =  {#N #IPLANE (G84) #X #Y #Z #R #F EOB }

    :NPECK = { #N #IPLANE (G83) #X #Y #Z #Q #R #F EOB }

    :NDEEP = { #N #IPLANE (G83) #X #Y #Z #Q #R #F EOB }

    :DRILLDWELL = :DRILL

    :COOLANT = {IF  ([COOLANT] EQ 1) THEN
                   #N (M09) EOB
                ENDIF
                IF ([COOLANT] EQ 2) THEN
                   #N (M08) EOB
                ENDIF
               }

    :CYCLEOFF = {
                 #N (G80) EOB
                 UNSET (G8)
                 unset :RPLANE
                 unset :PECK
                 UNSET (G9)
                 UNSET :FEED
                 UNSET :ZAXIS
                 UNSET :DWELL
                }

    :GOHOME = { if ( $Z lt $CLEARP ) then
            #N (G00) (G80) $CLEARP:ZAXIS eob
        endif
        #N (G00) $XSAFPOS:XAXIS $YSAFPOS:YAXIS EOB
        #N (G00) (G28) $ZSAFPOS:ZAXIS eob 
        #N (G49) EOB }

    :CLEARP = {
        if ($CLEARP lt $CLDIST) then
            ERRMSG "Clear plane is below Wsurf - DANGER"
        endif
        }


END:


User avatar
TomKerekes
Posts: 651
Joined: Mon Dec 04, 2017 1:49 am

Re: dolphin CAM post help processor needed

Post by TomKerekes » Wed Jul 24, 2019 5:22 pm

Hi turbothis,
now that my lathe works with Kmotion cnc i cant use the old mach3 PP because of the incremental thing
what incremental thing? Arc centers?

The post processor helps convert CAD data to GCode. It doesn't really convert GCode.

You might start with a simple example first.

It doesn't look to me like that Post Processor supports Arcs in the XZ plane. Only XY. I see:

#IINC = { ($XCEN-$OLDX):XARC }
#JINC = { ($YCEN-$OLDY):YARC }

for I and J but nothing for K. Also

:XARC = {"I"DDDDD.ddd} {"I"DDD.dddd}
:YARC = {"J"DDDDD.ddd} {"J"DDD.dddd}

for X and Y but not Z.
Regards,

Tom Kerekes
Dynomotion, Inc.

turbothis
Posts: 150
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: dolphin CAM post help processor needed

Post by turbothis » Wed Jul 24, 2019 5:57 pm

sorry for the confusion, this is just a hot mess tying it all together

i will punch in X and Z axis info and see what it does....

turbothis
Posts: 150
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: dolphin CAM post help processor needed

Post by turbothis » Wed Jul 24, 2019 7:25 pm

this one almost works but seems wonky on the X Y I K parameters

Code: Select all

TITLE:
	:T1 = {
		CNC Lathe
			Mach3 Radius Mode Post
			G32 type threading
			Modified by Steve Blackmore 06/04/05
	}
	:T2 = {
			Added Mach3 Constant surface speed support 30/01/05
			Added G83 peck drilling 02/03/05
			New tool format support added 27/07/05
			Altered M6 to follow tool select 24/12/05
			Modified by Steve Blackmore
	}
END:

VERSION:
        FILEVERSION 11.0 TURNING
END:

WORDS:
	:TMP = {DDDDDD.dd}
	:BLOCK = {"N"DDDD" "}
	:XAXIS = {"Z"DDDDD.ddd" "} {"Z"DDD.dddd" "}
	:YAXIS = {"X"DDDDD.ddd" "} {"X"DDD.dddd" "}
	:XARC = {"K"DDDDD.ddd" "} {"K"DDD.dddd" "}
	:YARC = {"I"DDDDD.ddd" "} {"I"DDD.dddd" "}
	:ARAD = {"R"DDDDD.ddd" "} {"R"DDD.dddd" "}
	:DELAY = {"G04 P"DDD" "}
	:DWELL = {"P"DDDD.dddd" "}
	:PECK = {"Q"DDDDD.ddd" "} {"Q"DDD.dddd" "}
	:NDEEP = {"Q"DDDDD.ddd" "} {"Q"DDD.dddd" "}
	:RPLANE = {"R"DDDDD.ddd" "} {"R"DDD.DDDD" "}
	:FEED = {"F"DDDDD.dddI" "} {"F"DDD.dddd" "}
	:SPIN = {"S"DDDD" "}
	:TOOL = {"T"ZDD}
	:SUBPR = {"P"DDDD" "}
	:REPEAT = {"L"DDDD" "}
	:CRC = {"D"DD" "}
	:TLC = {""ZDD" "}
	:SURF = {"S"DDDD" "}
  :SRAD = {"R"DDDD.ddI} {"R"DD.ddddI}
	:INDEX = {"INDEX"DDD.ddd" "}
	:PROGNO = {"O"DDDDD" "}
	:NUM1 = {" "DDDD.dddd" "}
	:ROT = {" "DD" "}
	:TOOLD = {DDDDD.ddd} {DDD.dddd}
END:

AXES:
	YSCALE		1
	TURRET
END:

GROUPS:
	:G1 = {G00_ G01_ G02_ G03_ G80_ G81_ G82_ G83_ G83.1_ G84_ G85_ G86_ G87_ G88_ G89_}
	:G2 = {G17_ G18_ G19_}
	:G3 = {G90_ G91_ G90.1_ G91.1_}
	:G5 = {G48_ G93_ G94_ G95_ G96_ G97_}
	:G6 = {G20_ G21_}
	:G7 = {G40_ G41_ G42_}
	:G8 = {G43_ G49_}
	:G10 = {G98_ G99_}
	:G12 = {G50_ G51_ G54_ G55_ G56_ G57_ G58_ G59_ G59.1_ G59.2_ G59.3_}
	:G13 = {G61_ G61.1_ G64_}
	:G4 = {M00_ M01_ M02_}
	:G7 = {M03_ M04_ M05_}
	:G8 = {M07_ M08_ M09_}
	:G9 = {M48_ M49_}
END:

CYCLES:

     	NPECK       CANNED
	NDEEP       CANNED
	TURN	    EXPAND
	FACE	    EXPAND
        THREAD	    EXPAND
END:

MACROS:
	#N = {
		$BLOCK:BLOCK

		; If the block number reaches the max (according to RD274) start over
		; Note: 'N' has no meaning in processing and is there for readability ONLY
		IF ($BLOCK EQ 99990) THEN
			SET $BLOCK = 5
		ENDIF
	}

	#L = { [RAPID ? (G01_) / (G00_)]  }
	#FTYPE = { [FEEDTYPE ? (G94_) / (G95_) ] }
	#X = { $X:XAXIS }
	#Y = { $Y:YAXIS }
	#I = { $XCEN:XARC }
	#K = { $YCEN:YARC }
	#AR = { $ARCRAD:ARAD }
	#R = { ($CCLDIST:RPLANE) }
	#P = { IF ($CDELAY NE 0) THEN ($CDELAY:DWELL) ENDIF }
	#F = { [RAPID ? [FEEDTYPE ? ($FPM:FEED) / ($FPR:FEED)] ] }
	#DWELL = { IF ($CDELAY NE 0) THEN (G82_) ELSE (G81_) ENDIF }
	#RAPID = { SET [RAPID] = 2 }
	#FEED = { SET [RAPID] = 1 }
	#SPIN =  { ($SPINDLE:SPIN) [SPIN ? (M05_) / (M03_) / (M04_) ] }
	#SURF =  { IF ( $SURF GT 1) THEN
                   $SURF:SURF
               ELSE "S525"
               ENDIF
              }
	#GCLW = {
		IF ($USR11 EQ 0) THEN
			(G02_)
		ELSE
			(G03_)
		ENDIF
		}
	#GACLW = {
		IF ($USR11 EQ 0) THEN
			(G03_)
		ELSE
			(G02_)
		ENDIF
		}
	#IPLANE = {
		IF ([CRETRACT] EQ 2) THEN
			(G99_)
		ELSE
			(G98_)
		ENDIF
	}

	#CRC = {
		; Only output G41/G42 if part surface is requested (PSPROG=2) which means the CNC
		;  has to offset the tool
		IF ([PSPROG] EQ 2) THEN
			[CUTCOM ? (G40_) / (G41_) / (G42_) ]
		ENDIF
	}

	#CRCNO = { 
		IF ([PSPROG] EQ 2) THEN
			($CRCNO:CRC)
		ENDIF
		}

  #Q = { ABS($CDEPTH/$CNDEPTH):NDEEP }

	#Q = { ABS($CDEPTH/$CNDEPTH):NPECK }

	#UNSET = {
		IF ((ABS($DELTAX) LT $USR8) AND (ABS($DELTAY) LT $USR8)) THEN
			UNSETALL
		ENDIF
	}

END:

RULES:

	:INIT = {
		set $RAPIDFEED = 100	 ; rapid feedrate
		SET $USR11 = 0 ; Set to 1 if Proturn Arcs to be negated (dependant on tool)
		SET $USR12 = 0 ; set for Arc direction fix for FRONT turret and TURN cycles.
		SET $USR13 = 1.0 ; SCALE FACTOR TO COMPENSATE FOR ANGLES BEING WRONGLY SCALED IN INCH.
		SET $USR14 = 0.0
	}

	:START = {
		; start with N10, increment in 10s
		SET $BLOCK = 10
		set $INCR = 10
	}

	:ORIGIN = {
		;#N (G92_) $ORIGINY:YAXIS $ORIGINX:XAXIS EOB
                ;unset :XAXIS
		;unset :YAXIS
	}

	:PPRINT = { #N "; (" $JOBTEXT ")" EOB }

	:RETRACT = { #N #L #Y #X EOB }

	:INSERT = { #N ";" $JOBTEXT EOB }

	:PARTNO = { ";" "(" $JOBTEXT ")" EOB  }

	:UNITS = {
		; G20/G21 = Inch/MM units
		; G18 = XZ Plane
		; G64 = Constant velocity mode (G61 = exact stop)
		; G80 = Cancel modal motion (deactivates all move modalities)
		; G90 = Absolute mode (G91 = Incremental mode)
		; M49 = Disable speed/feed overrides

		#N [UNITS ? (G21_) / (G20_)] (G18_) (G64_) (G80_) (G90_) (M49_) "G90.1 "

		; KAA - changed order to default IN so that the set is not needed 2x for each IN
		; Sets MIN change in move for a program block to be written
		SET $USR8 = 0.00005		; default IN scale
		set $usr13 = 25.4

		IF ([UNITS] EQ 1) THEN
			SET $USR8 = 0.0005	; set MM scale
			SET $USR13 = 1.0
		ENDIF

		(G40_) (G49_) (G80_) EOB
		
		#N #FTYPE #F EOB
		
	}

	
	:CUTCOM = {
			IF (0 NE 0) THEN
			; Only output G41/G42 if part surface is requested (PSPROG=2) which means the CNC
			;  has to offset the tool
			IF ([PSPROG] EQ 2) THEN
				[CUTCOM ? (G40_) / (G41_) / (G42_) ]
			ELSE
				(G40_)
			ENDIF

			#CRCNO EOB
		ENDIF
	}

	:GOTO = 
		{
		NULL ; "DISTANCE : " $DISTANCE:NUM1 EOB
		IF ($DISTANCE GE $USR8) THEN
			#N #CRC #CRCNO EOB
			#N #L #Y #X #FTYPE #F EOB
		ENDIF
		}

	:GOCLW = {
		#UNSET
		IF (([PSPROG] NE 2) OR ([CUTCOM] LT 2)) THEN
			#N #CRC EOB
			#N #GCLW #Y #X #AR #F EOB
		ELSE
			#N #CRC #CRCNO EOB
			#N #GCLW #Y #X #AR #F EOB
		ENDIF
	}

	:GOACLW = {
		#UNSET
		IF (([PSPROG] NE 2) OR ([CUTCOM] LT 2)) THEN
			#N #CRC EOB
			#N #GACLW #Y #X #AR #F EOB
		ELSE
			#N #CRC #CRCNO EOB
			#N #GACLW #Y #X #AR #F EOB
		ENDIF
	}

	:DELAY = { #N $DELAY:DELAY EOB }

	:NDEEP = { #N (G83) #Y #X #R #Q #IPLANE #F EOB }

	:NPECK = { #N (G83.1) #Y #X #R #Q #IPLANE #F EOB }

	:SCREWING = { 	#N "G32 " #Y #X #F EOB
		UNSET (G5)
		UNSET :FEED
	}
	:SCRCUT = {
            	UNSET :FEED
		#N #FTYPE #F EOB
	       	#N (G0_) #X #Y EOB
		#N (G1_) $CXSTART:XAXIS $CYSTART:YAXIS EOB
		#N (G76_) ($CYEND-$CDEPTH):YAXIS $XEND:XAXIS ""$FEEDANGLE:PA " "$PITCH:FS " "$ROUGHCUTS:DS " "$FINISHCUTS:PF " T0 " $SPINDLE:SPIN ""$CLDIST:PO eob
		#N (G94_)eob
      		UNSET :FEED

    }


	:SPINDLE = {UNSET (G5)

        	IF ( [SPIN] eq 1) then
        	    	#N (M05) eob
        	ENDIF
        	IF ([SPINTYPE] EQ 2 ) THEN
        		#N [SPIN ? NULL / (M03_) / (M04_) ] #FTYPE #F EOB
			#N (G48_) $MAXSPIN:SPIN " " EOB
			#N (G96_) $SURF:SURF EOB
        	ELSE
        		#N [SPIN ? NULL / (M03_) / (M04_) ] #FTYPE #F EOB
			#N (G97_) $SPINDLE:SPIN " " EOB
        	ENDIF }



	:FINISH = { #N (M05_) (M09_) EOB
			#N (M30_) EOB " " EOB }

	:TOOL = {UNSET :G5
		"; TOOL definition" EOB
		}

	:SELCTL = {
		SET $USR11 = 0
		IF ([TURRET] EQ 2) THEN
			SET $USR12 = 1     ; Front Turret, set $USR12 for TURN cycles arc direction
		else
			SET $USR12 = 0
		ENDIF
		set $CYCLETIME = $CYCLETIME + 0.5 ; 30 seconds for a tool change
			#N (M09_) EOB
	        	#N "G00"" " $YSAFPOS:YAXIS $XSAFPOS:XAXIS (M05_) EOB

		IF ($X NE $XTLOAD ) THEN
			#N (G28_) $XTLOAD:XAXIS EOB
			#N (G49_) EOB

		ELSE
		IF ($Y NE $YTLOAD ) THEN
			#N (G28_) $YTLOAD:YAXIS EOB
			#N (G49_) EOB

		ENDIF
		ENDIF
		EOB

			#N (G49_) EOB
			#N " ( " $JOBTEXT " )" EOB
			#N  $TOOLNO:TOOL $TLCNO:TLC"" EOB
		}

	:COOLANT = {
		IF  ([COOLANT] EQ 0) THEN
			#N (M09_) EOB
		ELSE
		IF ([COOLANT] EQ 1) THEN
			#N (M09_) EOB
		ELSE
		IF ([COOLANT] EQ 2) THEN
			#N (M08_) EOB
		ENDIF
		ENDIF
		ENDIF
		}

	:CYCLEOFF = {
		#N (G80_) EOB
		unset :G1
		UNSET(M08_)
		UNSET:RPLANE
		UNSET(M09_)
		UNSET :FEED
		UNSET:YAXIS
		UNSET:XAXIS
		UNSET (G5)
		UNSET :SPIN
		UNSET :PECK
		UNSET :DWELL
	}

	:GOHOME = {
		UNSET (G5)
		UNSET :FEED
		UNSET :SPIN
		#N "G00" " " $YSAFPOS:YAXIS $XSAFPOS:XAXIS #FTYPE #F EOB
		}


END:

turbothis
Posts: 150
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: dolphin CAM post help processor needed

Post by turbothis » Wed Jul 24, 2019 7:34 pm

i think it should be like this....

:XAXIS = {"X"DDDDD.ddd" "} {"X"DDD.dddd" "}
:ZAXIS = {"Z"DDDDD.ddd" "} {"Z"DDD.dddd" "}
:XARC = {"I"DDDDD.ddd" "} {"I"DDD.dddd" "}
:ZARC = {"K"DDDDD.ddd" "} {"K"DDD.dddd" "}

and ....

#I = { $XCEN-$OLD:XARC }
#K = { $ZCEN-$OLD:YARC }

User avatar
TomKerekes
Posts: 651
Joined: Mon Dec 04, 2017 1:49 am

Re: dolphin CAM post help processor needed

Post by TomKerekes » Wed Jul 24, 2019 7:49 pm

I think

#K = { $ZCEN-$OLD:YARC }

should be

#K = { $ZCEN-$OLD:ZARC }
Regards,

Tom Kerekes
Dynomotion, Inc.

turbothis
Posts: 150
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: dolphin CAM post help processor needed

Post by turbothis » Wed Jul 24, 2019 8:02 pm

so far this is what i got
in the cam.....

Image

and on the kmotioncnc......

Image


just some strange arc's in there!

turbothis
Posts: 150
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: dolphin CAM post help processor needed

Post by turbothis » Wed Jul 24, 2019 8:06 pm

close up of the odd arc's
its like they are backwards?

Image

User avatar
TomKerekes
Posts: 651
Joined: Mon Dec 04, 2017 1:49 am

Re: dolphin CAM post help processor needed

Post by TomKerekes » Wed Jul 24, 2019 8:53 pm

Looks like $USR11 can be changed to 1to reverse the Arcs

SET $USR11 = 0 ; Set to 1 if Proturn Arcs to be negated (dependant on tool)
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply