586,103 active members*
3,859 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > Dolphin CAD/CAM > post processor for KmotionCNC / help adjusting
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2009
    Posts
    230

    post processor for KmotionCNC / help adjusting

    hey, andre.
    this might be a better place to work on this rather than emailing
    i had emailed you last week about my lathe PPR but figured i would warm up on something already functioning ( my milling PPR )
    it is a basic 3 axis knee mill with VFD spindle
    i have chatbot helping me but we cant get it all worked out


    1 i would like to have a G04 with a second per 1000 rpm commanded. can be rounded up to whole seconds
    chatbot got me this but it does not add the dwell in the final G code

    :SPINDLE = { $SPINDLE:SPIN (M03) eob
    (G04 P$SPINDLE/1000) eob ; Dwell 1 second per 1000 RPM
    }

    2 trying to have a basic end of cycle details

    :FINISH = {
    (G00 Z0.5) (M05) (M09) (M30) EOB
    }


    3 a basic once over if i am missing or killing something usefull
    THANKS

    HTML Code:
    TITLE:
        :T1 = {
            KmotionCNC Milling Controller       
        }
    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}
        :KARC  =  {" K"DDDDD.ddd} {" K"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:
        :G2  = { G17  G18  G19 }
        :G1  = { G00  G01  G02  G03 }
        :G8  = { G73  G74  G76  G80  G81  G82  G83  G84  G85  G86  G87  G88  G89 } 
        :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
        HELIX      VECTOR
        ARC        QUADRANT
    END:
    
    MACROS:
        #N      = {}
        #L      = { [RAPID ? (G01) / (G00)]  }
        #FTYPE  = { (G94) }
        #X      = { ($X:XAXIS) }
        #Y      = { ($Y:YAXIS) }
        #Z      = { ($Z:ZAXIS) }
        #I      = { $XCEN-$OLDX:XARC }
        #J      = { $YCEN-$OLDY:YARC }
        #K      = { $KCEN-$OLDK:KARC }
        #R      = { ($CCLDIST:RPLANE) }
        #P      = { if ( $CDELAY ne 0 ) then ($CDELAY:DWELL) endif }
        #F      = { ($FPM:FEED)  }
        #DWELL  = { if ($CDELAY ne 0) then (G82) else (G81) 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
        }
        
        :XPROGNO = { "%" EOB $PROGNO:PROGNO EOB }
       
        :UNITS = {
            #N (G20) (G17) (G90) (G40) (G49) (G80) (G94) 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 
        }
    
        :PPRINT = { #N $JOBTEXT EOB }
    
        :RETRACT = { #N (G00) #Z eob }
    
        :INSERT = { #N $JOBTEXT 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
                #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 =  { (G02) #CRC #X #Y #Z #I #J #CRCNO #F eob }
    
        :GOACLW = { (G03) #CRC #X #Y #Z #I #J #CRCNO #F eob }
    
        :DELAY  = { $DELAY:DELAY eob }
    
        :SPINDLE = { $SPINDLE:SPIN (M03) eob
                     (G04 P$SPINDLE/1000) eob   ; Dwell 1 second per 1000 RPM
    	     }
    
       :FINISH = {  (_M05) (_M09) EOB
                    (_M30) EOB }
    
        :CLEARP = {
            if ($CLEARP lt $CLDIST) then
                ERRMSG "Clear plane is below Wsurf - DANGER"
            endif
        }
    
    END:
    shizuoka an-s knee mill=kflop/kanalog running nema 34 dc brushed servos
    cincinnati sabre 750=kflop/kanalog building now with ac brushless servos

  2. #2
    Join Date
    Feb 2007
    Posts
    414

    Re: post processor for KmotionCNC / help adjusting

    Hello,

    My advice would be to abandon chatgpt as this might lead you down a rabbit hole with no obvious advantage.

    If you need any existing post modified you can always contact us, something that might take us 30mins might take you days to resolve.

    Thats not to say the chatgpt route is wrong, just a bit like reinventing the wheel as we have soo many existing posts.

    One thing to bear in mind when doing any work on our posts is that the syntax is 100% important, 1 odd character or false logic statement can result in no output whatsoever.

    ATb
    Andre

  3. #3
    Join Date
    Oct 2009
    Posts
    230

    Re: post processor for KmotionCNC / help adjusting

    thanks for the reply.
    chatbot has been excellent for me in many ways
    the biggest feature is it is always there with an immediate answer
    i have used it for months now building fuel injection C codes, paddle shift 6 speed automatic transmission controllers and many other projects for Arduino. ill give you one guess as to what they say on the Arduino forum about chatbot......
    i 100% understand chatbot maybe be wrong but like i said it tells me something right away and i learn together how to use it better and learn the material from at least one angle
    shizuoka an-s knee mill=kflop/kanalog running nema 34 dc brushed servos
    cincinnati sabre 750=kflop/kanalog building now with ac brushless servos

  4. #4
    Join Date
    Oct 2009
    Posts
    230

    Re: post processor for KmotionCNC / help adjusting

    anyways....
    so should i ask questions here or in email form for some help?

    still looking to get some input on this idea i would love to have in the PPR

    i would like to print a G04 with a second per 1000 rpm commanded. can be rounded up to whole seconds

    :SPINDLE = { $SPINDLE:SPIN (M03) eob
    (G04 P$SPINDLE/1000) eob ; Dwell 1 second per 1000 RPM
    }
    shizuoka an-s knee mill=kflop/kanalog running nema 34 dc brushed servos
    cincinnati sabre 750=kflop/kanalog building now with ac brushless servos

  5. #5
    Join Date
    Oct 2009
    Posts
    230

    Re: post processor for KmotionCNC / help adjusting

    i try and learn with your program but get some odd results
    i click on the tabs and get the internet news?



    shizuoka an-s knee mill=kflop/kanalog running nema 34 dc brushed servos
    cincinnati sabre 750=kflop/kanalog building now with ac brushless servos

  6. #6
    Join Date
    Oct 2009
    Posts
    230

    Re: post processor for KmotionCNC / help adjusting

    is there a complete list?

    HTML Code:
    The postprocessor shown below illustrates most of the programming instructions described in this section of the manual.
    
    TITLE: 
        :T1 = { MOOG Hydrapath, Copyright : © 1997 Dolphin CadCam Ltd.. } 
    END: 
      
    WORDS: 
        :N = {"N"DDDDZ} 
        :X = {"X"DDDD.ddd} {"X"DDD.dddd} 
        :Y = {"Y"DDDD.ddd} {"Y"DDD.dddd} 
        :Z = {"Z"DDDD.ddd} {"Z"DDD.dddd} 
        :R = {"R"DDDD.ddd} {"R"DDD.dddd} 
        :W = {"W"DD.dd} {"W"D.ddd} 
        :I = {"I"DDDD.ddd} {"I"DDD.dddd} 
        :J = {"J"DDDD.ddd} {"J"DDD.dddd} 
        :F = {"F"DDDD} {"F"DDD.d} 
        :S = {"S"DDDD} 
        :T = {"T"DD} 
        :P = {"P"DD} 
        :E = {"E"DD} 
        :D = {"D"DD.d} 
    END: 
      
    MACROS: 
        #N = { $BLOCK:N } 
        #X = { ($X:X) } 
        #Y = { ($Y:Y) } 
        #Z = { ($Z:Z) } 
        #R = { ($CCLDIST:R) } 
        #W = { ($CD1:W) } 
        #I = { $XCEN:I } 
        #J = { $YCEN:J } 
        #F = { if(($FPM lt $USR1)OR($FPM gt $USR2))then 
                    ERRMSG "Feedrate out of range" 
                Endif 
                [RAPID ? ($FPM:F) / NULL] } 
        #S = { if( [SPIN] gt 1 ) then 
                    if( ( abs($SPINDLE) lt 50 ) OR ( abs($SPINDLE) gt 4500 ) ) then 
                        ERRMSG "Spindle speed out of range" 
                    endif 
                $SPINDLE:S 
                endif } 
        #P = { $PROGNO:P } 
        #D = { $DELAY:D } 
        #RAP={ [RAPID ? (G01) / (G00)] } 
        #CRC={ [CUTCOM ? (G40) / (G41) / (G42)] } 
        #T = { $TOOLNO:T } 
        #RP= { [CRETRACT ? (M81) / (M82)] } 
    END: 
      
    AXES: 
        XSCALE 1 
        YSCALE 1 
        ZSCALE 1 
    END: 
      
    GROUPS: 
        :G1 = { G90 G91 } 
        :G2 = { G00 G01 } 
        :G3 = { G40 G41 G42 } 
        :G4 = { G70 G71 } 
        :G5 = { G80 G81 G82 G83 G84 G85 } 
        :M1 = { M03 M04 M05 } 
        :M2 = { M07 M08 M09 } 
    END: 
      
    CYCLES: 
        DRILL CANNED 
        DEEPDRILL CANNED 
        PECKDRILL CANNED 
        TAP CANNED 
        BORE CANNED 
        HELIX VECTOR 
    END: 
      
    RULES: 
        :INIT   = { ; machine startup condition 
                 set [LIMITS] = 1 ; enable axis limit checking 
                     set $MAXBLOCKS = 1000 ; split output files after 1000 blocks 
                    (G00) (G17) (G40) (G80) (G90)(M09) (M05) } 
        :START  = { "%" eob set $BLOCK = 5 set $INCR = 5 } 
        :PROGNO = { #N #P eob } 
        :UNITS  = { if([UNITS] eq 1) then 
                      set $USR1 = 8 ; min metric feedrate 
                      set $USR2 = 8750 ; max metric feedrate 
                    else 
                      set $USR1 = 0.3 ; min inch feedrate 
                      set $USR2 = 350 ; max inch feedrate 
                    endif 
                    #N [UNITS ? (G71) / (G70)] eob 
                    #N (G17) eob #N (G90) eob } 
        :TLOAD  = { #N "G99" $XTLOAD:X $YTLOAD:Y $ZTLOAD:Z eob } 
        :ORIGIN = { #N "G92" $TABLOFF:E $ORIGINX:X $ORIGINY:Y $ORIGINZ:Z eob } 
        :SELCTL = { #N #T "M06" eob } 
        :INSERT = { #N "(" $JOBTEXT ")" eob } 
        :SPINDLE= { #N #S [SPIN ? (M05) / (M03) / (M04) ] eob } 
        :COOLANT= { #N [COOLANT ? (M09) / (M08) ] eob } 
        :GOTO   = { #N #RAP #CRC #X #Y #Z #F eob } 
        :GOCLW  = { #N "G02" #X #Y #I #J #F eob unset (G2) } 
        :GOACLW = { #N "G03" #X #Y #I #J #F eob unset (G2) } 
        :GOHOME = { #N (G00) $ZSAFPOS:Z eob #N $XSAFPOS:X $YSAFPOS:Y eob } 
        :RETRACT= { #N (G00) #Z eob } 
        :STOP   = { #N "M00" eob } 
        :OPSTOP = { #N "M01" eob } 
        :DRILL  = { #N [CDELAY ? (G81) / (G82)] #X #Y #R #Z #F #RP eob } 
        :NDEEP  = { #N (G83) #X #Y #R #W #Z #F #RP eob } 
        :BORE   = { #N (G85) #X #Y #R #Z #F #RP eob } 
        :TAP    = { #N (G84) #X #Y #R #Z #F #RP eob } 
        :NPECK = :NDEEP 
        :CYCLEOFF={ #N (G80) eob unset (G2) unset :R unset :W unset (M3)} 
        :FINISH = { #N "M30" eob "%" eob 
                     if( $XMAX > 1250 || $XMIN < 0 || $YMAX > 450 || $YMIN < 0 then 
                         Errmsg "Axis limits have been exceeded" eob 
                       endif } 
        :ENDSEC = { #N (G00) $ZSAFPOS:Z eob #N $XSAFPOS:X $YSAFPOS:Y eob 
                    #N (M09) eob 
                    #N "M30" eob "%" eob } 
        :NEWSEC = { "%" eob unsetall 
                    #N #P eob 
                    #N [UNITS ? (G71) / (G70)] eob 
                    #N (G17) eob 
                    #N (G90) eob 
                    #N "G99" $XTLOAD:X $YTLOAD:Y $ZTLOAD:Z eob 
                    #N "G92" $TABLOFF:E $ORIGINX:X $ORIGINY:Y $ORIGINZ:Z eob 
                    #N #T "M06" eob 
                    #N #S [SPIN ? (M05) / (M03) / (M04) ] eob 
                    #N (G00) #X #Y eob 
                    #N (G00) [UNITS ? ($Z+3):ZAXIS : ($Z+0.1):ZAXIS) eob 
                    #N (G01) #Z #F eob 
                    #N [COOLANT ? (M09) / (M08) ] eob } 
    END: 
    shizuoka an-s knee mill=kflop/kanalog running nema 34 dc brushed servos
    cincinnati sabre 750=kflop/kanalog building now with ac brushless servos

  7. #7
    Join Date
    Oct 2009
    Posts
    230

    Re: post processor for KmotionCNC / help adjusting

    shizuoka an-s knee mill=kflop/kanalog running nema 34 dc brushed servos
    cincinnati sabre 750=kflop/kanalog building now with ac brushless servos

Similar Threads

  1. Replies: 1
    Last Post: 01-02-2021, 11:05 PM
  2. Replies: 0
    Last Post: 02-17-2018, 07:10 PM
  3. KMotionCNC Fusion 360 post?
    By m_c in forum Dynomotion/Kflop/Kanalog
    Replies: 1
    Last Post: 11-29-2017, 02:14 AM
  4. Post processor for KMotionCNC
    By John Coloccia in forum MadCAM
    Replies: 21
    Last Post: 03-28-2013, 10:28 PM
  5. Adjusting lathe post for interpolation error?
    By gandp in forum Mastercam
    Replies: 1
    Last Post: 04-22-2011, 11:16 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
  •