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:

Check if Rough or Skim Pass


CNCGUY
 Share

Recommended Posts

If you have one Rough and then the Finish passes in the same operation, then Yes.

 

There is the post variable pass$ which will tell you which pass (count) you are on in the operation.

 

code:

ptlchg1002$      #Call at actual toolchange, 

 

"(PASS = ", ~pass$, ")", e$ # Current PASS

So you could key off an "if pass$ = value" test and output code based on the result.

Link to comment
Share on other sites

troy, put this in your post. hth

 

 

psof$ #Start of file for non-zero tool number

!op_id$

pcuttype

g20code$ = zero

cc_pos$ = zero

prv_xia = vequ(startx$)

prv_uia = vequ(startx$)

*progno$, e$

comment$

pbld, n$, *sg20code, *sgabsinc, [if feed_out, "G94"], e$

pbld, n$, "M31", e$

pbld, n$, "G77 P1", e$

if tool_op$ = 74 & contour_typ$ <> 0, n$, "M15 P1", e$

if tool_op$ = 74 & contour_typ$ = 0, n$, "M15 P0", e$

if strtflag = one, ptlch_strt

else,

[

prv_g20code$ = -1

prv_xabs = c9k

prv_yabs = c9k

ptlch_nstrt

]

if skimpass$ > -1,pbld, n$, "M37", e$

else, pbld, n$, "M38", e$

# if skimpass < 0, pbld, n, "M38", e$

pbld, n$, pconchg$, e$

motst$ = one

sof = zero

Link to comment
Share on other sites

it works on mine.

 

 

O1500

( TEST )

G0 G90

M31

G77 P1

M15 P0

G92 X-.08548 Y.04889

M60

M37

S1 D1

G41 G1 X-.075 Y0.

X-.0625 Y-.15

X.0625

X.075 Y0.

G40 X.08548 Y.04889

M50

G0 X-.08548 Y.04889

G92

M60

M38

S2 D2

G41 G1 X-.075 Y0.

X-.0625 Y-.15

X.0625

X.075 Y0.

G40 X.08548 Y.04889

M50

G0 X-.08548 Y.04889

G92

M60

M38

S3 D3

G41 G1 X-.075 Y0.

X-.0625 Y-.15

X.0625

X.075 Y0.

G40 X.08548 Y.04889

M50

G0 X-.08548 Y.04889

G92

M60

M38

S4 D4

G41 G1 X-.075 Y0.

X-.0625 Y-.15

X.0625

X.075 Y0.

G40 X.08548 Y.04889

M50

M29

M30

Link to comment
Share on other sites

yes i do.oops!

 

ptlchg$ #Tool change

pcuttype

 

g20code$ = zero

comment$

!xabs, !yabs

if op_id$ <> prv_op_id$, sg20code, xabs, yabs,e$

 

#if there was no motion, stop gcode, else force motion

if (motst$ < one | motst$ > 7) & not(strtflag), !g20code$

else,

[

prv_g20code$ = -1

prv_xabs = c9k

prv_yabs = c9k

]

if strtflag, ptlch_strt

else, ptlch_nstrt

if skimpass$ > -1,pbld, n$, "M37", e$

else, pbld, n$, "M38", e$

# if skimpass$ < 0, pbld, n$, "M38", e

pbld, n$, pconchg$, e$

!op_id$

Link to comment
Share on other sites
  • 2 weeks later...

O.K., I have determined why the M38 does not work on the second pass - Its not the same geo as the first pass. I need to figure out some logic to do this one!!!

 

Since we draw lead in/out lines, is there any way to "force" Mcam to cancel cc on the last move rather then have an extra .01 move?

 

Hope this makes sense.

Link to comment
Share on other sites

troy, you don't have to create your own leadin-out geometry anymore. use your thread and cut icons.it should cancel the comp after it leaves the geometry on your last move.do you have line lead in and out checked in the control def.under start/leads.is it posting correctly or not doing right at the machine.look at your post and find pccomp and see where it is at.

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