Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Master Mason

Verified Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by Master Mason

  1.  

    15 minutes ago, C^Millman said:

    You said you are using mi8$ to turn this on. Are you saving the mi8$ using sav_mi8$ and then using that back to the last section of the post? With Mastercam once a mi variable is used the value is discarded. By using the sav_ and  last_ come into play in the MPMaster post. Depending on how you are doing what you are doing you will need to use the sav_ of a mi or you may even need to make logic to call the last_ .

    The latest MPMASTER has mi9$ in it. Follow that logic and you will see if doesn't go to the end, but the mr1$ and mr2$ logic do use last_ logic that allows their values to be used over and over again the way till the end of the post code to turn off the highspeed codes with phsm_off. It relates to the mr1_flg and how they use it's logic to help keep track of what is on or off which is important for something like you are doing.

    For me MP Logic is hard to wrap your brain around sometimes. You really need to think about the process and then break down the steps and it is best to use a proven process to work out a new process.

    Yes I am using mi8$ and no I am not saving...thanks for pointing me it the right direction. 

  2. I am trying to add some custom program rotation to my post, my problem is on the last tool with rotation, I can't get the G69 to post

    I am using Misc Values (mi8) to toggle on/off  (mpmaster post)

    Thanks,  Ed

    N40 M06 T40 (--SPOT DRILL, D0.625 - 5/8, HSS)                 -----------second to last tool with rotation
    (= ADD NOTES)
    G00 G17 G90 G54 B0. X0 Y0 S427 M03
    G68 X0 Y0 R#110                                                                    ---------------Rotation post good
    X-1.2132 Y3.0303
    G43 H100 Z1. M08 T56
    G94
    G98 G81 Z-1.9645 R-1.648 F1.06
    X2.0726 Y2.5456
    X3.1149 Y-.7399
    X.2366 Y-3.218
    X-1.5912 Y-2.8715
    X-3.2543 Y.8904
    G80
    X-2.3969 Y1.0941
    G98 G81 Z-.133 R.1 F6.83
    X-1.7809 Y-1.9417
    X1.4149 Y-2.223
    G80
    X2.1791 Y-2.131
    G98 G81 Z-.1875 R.1 F6.83
    G80
    X2.5517 Y.6585
    G98 G81 Z-.132 R.1 F6.83
    X.1625 Y2.6301
    G80 M09
    G69                                                                                                 ---------------------cancel is good
    M05
    G91 G30 X0. Y0. Z0.
    M01

    N56 M06 T56 (--1.0 FLAT ENDMILL)                                            ---------------last tool with rotation
    (*MILL RELIEF, SECTION F-F - 1 PLC)
    (COMPENSATION TYPE - COMPUTER)
    (= ADD NOTES)
    G00 G17 G90 G54 B0. X0 Y0 S1000 M03
    G68 X0 Y0 R#110                                                                                  ---------------Rotation post good
    X-3.7737 Y2.9752
    G43 H56 Z2. M08 T24
    Z-2.397
    G94 G01 X-3.7327 Y2.7286 F5.
    G03 X-3.4452 Y2.5228 I.2466 J.0409
    G01 X-3.1887 Y2.5654
    G03 X-2.1337 Y3.4197 I-.225 J1.3565
    G01 X-2.0424 Y3.6524
    G03 X-2.1838 Y3.9765 I-.2327 J.0913
    G01 X-2.4165 Y4.0678
    G00 Z2. M09
    M05                                                                                                               ---------no cancel
    G91 G30 X0. Y0. Z0.
    M01

    N24 M06 T24 (--DRILL, INSERT, 1-1/6 CENTRE-DEX)                            -------------no rotation from here to end 
    (= ADD NOTES)
    G00 G17 G90 G55 B90. X0. Y0. S721 M03
    G43 H24 Z2. M08 T40
    G94
    G98 G81 Z0. R.45 F3.61
    G80 M09
    M05
    G91 G30 X0. Y0. Z0.
    M01

     

    pretract        #End of tool path, toolchange
          phsm_off
          sav_absinc = absinc$
          absinc$ = one
          sav_coolant = coolant$
          coolant$ = zero
    #      if nextop$ = 1003, #Uncomment this line to leave coolant on until eof unless
    #        [                 #  explicitely turned off through a canned text edit
            if all_cool_off,
              [
              #all coolant off with a single off code here
              if coolant_on, pbld, n$, *sall_cool_off, e$
              coolant_on = zero
              ]
            else,
              [
              local_int = zero
              coolantx = zero
              while local_int < 20,
                [
                coolantx = and(2^local_int, coolant_on)
                local_int = local_int + one
                if coolantx > zero,
                  [
                  coolantx = local_int
                  pbld, n$, scoolantx, e$
                  ]
                coolantx = zero
                ]
              coolant_on = zero
              ]
    #        ]
          #cc_pos is reset in the toolchange here
          cc_pos$ = zero
          if prog_rot = one, pbld, n$, "G69", e$                                         #Added Program Rotation Cancel
          if convert_rpd$ = one,
            [
            gcode$ = one
            feed = maxfeedpm
            ipr_type = zero
            ]
          else, gcode$ = zero
          pbld, n$, sccomp, *sm05, psub_end_mny, e$
           pbld, n$, sgabsinc, sgcode, [if gcode$ = 1, sgfeed], *sg28, "X0.", "Y0.", "Z0.", [if gcode$ = 1, feed], scoolant, e$
    #      if lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
    #      pbld, n$, *sg28, "X0.", "Y0.", protretinc, e$
    #      if lock_codes = one & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$
          if abs(fmtrnd(cabs)) > 360 & nextop$ <> 1003 & not(index),
            [
            if lock_codes = one, pbld, n$, *sunlock, sunlockcomm, e$
            rotretflg = 1
            pbld, n$, `sg28, protretinc, e$
            rotretflg = 0
            if lock_codes = one & cuttype = 0, pbld, n$, *slock, slockcomm, e$
            ]
          absinc$ = sav_absinc
          coolant$ = sav_coolant

  3. Found it:

     

    Address string stro

     

    # --------------------------------------------------------------------------

    #String and string selector definitions for NC output

    # --------------------------------------------------------------------------

    #Address string definitions

    strm : "M"

    strn : "N"

    stro : "N"

    strp : "P"

    srad : "R"

    srminus : "R-"

    sblank : ""

     

    Thanks for responding Ron.

  4. On a Haas, sub programs can be at the bottom of the main program with "N" numbers and called with G97, but my post outputs with "O"

    I thought that I could change the sub program numbers from "O" to "N" in this section

    of my post by the only place it works is on the line for progno$

     

    #Move comment (pound) to output colon with program numbers

    fmt "O" 7 progno$ #Program number

    #fmt ":" 7 progno$ #Program number

    fmt "O" 7 main_prg_no$ #Program number

    #fmt ":" 7 main_prg_no$ #Program number

    fmt "N" 7 sub_prg_no$ #Program number

    #fmt ":" 7 sub_prg_no$ #Program number

    fmt "X" 2 sub_trnsx$ #Rotation point

    fmt "Y" 2 sub_trnsy$ #Rotation point

    fmt "Z" 2 sub_trnsz$ #Rotation point

     

    Any help would be greatly appreciated!!

     

    Ed

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...