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:

POINT toolpath with MANY POINTS


Recommended Posts

Hello everyone,
   I always use the POINT toolpath as my PIN STOP but I got limited.  Like I want as many as G1 X Y points but before the G0 X Y should be M0 then I got problem.  Below here this is how I defined:


#CUSTOM STRINGS
sPoint : ""# M0 Pin Stop Here

 

pncoutput       #Movement output
 if sPoint <> snull,
        [
        pbld, no_spc$, *sPoint, no_spc$ , "(AGAINST STOCK TO PIN STOP HERE)", e$
        sPoint = snull
        ]

pcant_out       #Canned text - build the string for output
      #Assign string select type outputs
      if cant_pos < three, #cant_pos indicates canned text output
        [
        if cantext$ = three, bld = one
        if cantext$ = four, bld = zero
        #Build the cantext string ADD M0 HERE
        if cantext$ = one,
          [
          if tool_op$ = 19 & can1_flg, sPoint = sm00
          else, strcantext = strcantext + sm00
          ]

 

pcan1           #Canned text - with move
      strcantext = sblank
      can1_flg = 1 # ADD M0 HERE
      if cant_no$ > zero,
        [
        if cant_pos1$ = one | cant_pos1$ = four, pcant_1
        if cant_pos2$ = one | cant_pos2$ = four, pcant_2
        if cant_pos3$ = one | cant_pos3$ = four, pcant_3
        if cant_pos4$ = one | cant_pos4$ = four, pcant_4
        if cant_pos5$ = one | cant_pos5$ = four, pcant_5
        if cant_pos6$ = one | cant_pos6$ = four, pcant_6
        if cant_pos7$ = one | cant_pos7$ = four, pcant_7
        if cant_pos8$ = one | cant_pos8$ = four, pcant_8
        if cant_pos9$ = one | cant_pos9$ = four, pcant_9
        if cant_pos10$ = one | cant_pos10$ = four, pcant_10
        if cant_pos11$ = one | cant_pos11$ = four, pcant_11
        if cant_pos12$ = one | cant_pos12$ = four, pcant_12
        if cant_pos13$ = one | cant_pos13$ = four, pcant_13
        if cant_pos14$ = one | cant_pos14$ = four, pcant_14
        if cant_pos15$ = one | cant_pos15$ = four, pcant_15
        if cant_pos16$ = one | cant_pos16$ = four, pcant_16
        if cant_pos17$ = one | cant_pos17$ = four, pcant_17
        if cant_pos18$ = one | cant_pos18$ = four, pcant_18
        if cant_pos19$ = one | cant_pos19$ = four, pcant_19
        if cant_pos20$ = one | cant_pos20$ = four, pcant_20
        ]
      if cstop$, strcantext = strcantext + sm00
      if cgstop$, strcantext = strcantext + sm01
      can1_flg = 0 # ADD M0 HERE
     
#Output of strcantext occurs at the end of the output line

 

=========================== G-CODEs=====================

N1( .5000,1/2 EM, CB, USED TOOL,)
(3FLTS .750LOC, 1.00LOH)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0 
T1 M6(PIN STOP WITH MULTIPLE POINTS, CUT#1)
G90 G54 X3.9198 Y-.1655
G43 H1 Z0. (DOC= Z0.)
G1 X1.9204 Y-.2423 F10.
M0(AGAINST STOCK TO PIN STOP HERE) ======================> WRONG PLACE
X1.4077 Y-.8148
M0(AGAINST STOCK TO PIN STOP HERE) ======> SHOULD BE HERE
G0 X4.0992 Y-1.3873
G91 G28 Z0.
G28 Y0.
G0 G90 G54 X0.
M30
%

Link to comment
Share on other sites

I guess I found the answer... Just do this and you'll be good.

 

prapidout       #Output to NC of linear movement - rapid 
      sav_gcode = gcode$
      if convert_rpd$ = one,
        [
        gcode$ = one
        feed = maxfeedpm
        ipr_type = zero
        ]
    #"DEBUG: ", ~mr3$, ~nextop$, e$
	  if tool_op$ = 19, "M0(AGAINST PIN STOP HERE)", e$
      pcan1, pbld, n$, [if prv_sgplane <> sgplane, sgplane], `sgcode, [if prv_sgplane <> sgplane, sgabsinc], pccdia, #, [if gcode$ = 1, sgfeed]
        pxout, pyout, pzout, pcout, [if gcode$ = 1, `feed], strcantext, scoolant, e$
      gcode$ = sav_gcode

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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...