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:

workpiece loading check macro


Recommended Posts

So i tried to make this macro to check 3 parts on a fixture checking a witness cut from the previous operation.

It seems to work like I intended. the first check is for the height and the other is for crookedness. is the anything you would add or remove?

thanks.

 

%
O0010(OP 3 PROBE)
(DATE - OCT. 27 2021 TIME - 3:44 PM)
(MACHINE - MATSUURA MAM72-35V 3 AXIS)
G131 R10
G91 G28 Z0 M19
G0 G90 G80 G40 G49 G17
G54
N10 T311 M6 ( 2 MM PROBE OMP 600 )
M01
M132
G0 G90 G54 X2.8949 Y-.512 AX[4]=0. C0.
M131
G65 P9532 (PROBE ON)
G43 H311
(PROTECTED POSITIONING CLEARANCE HEIGHT)
G65 P9510 Z13.6743
( PROBE Z SURFACE )
G65 P9510 X2.8949 Y-.512
G65 P9510 Z12.5
G65 P9511 Z11.6793
G65 P9510 Z13.6743
(CHECK FOR LOAD HEIGHT ERROR)
IF[#142GT.004]GOTO600
(STORE POINT 1)
G65 P9534
(PROTECTED POSITIONING)
G65 P9510 X-.512 Y2.8949 Z13.6743
( PROBE Z SURFACE )
G65 P9510 X-.512 Y2.8949
G65 P9510 Z12.5
G65 P9511 Z11.6793
G65 P9510 Z13.6743
(COMPARE POINT 2)
G65 P9534 Z0.
IF[#137LE.0005]GOTO150
GOTO600
N150
IF[#137GE-.0005]GOTO200
(MISLOAD REJECT PALLET)
GOTO600
N200
(PROTECTED POSITIONING)
G65 P9510 X-1.0041 Y2.7631 Z13.6743
( PROBE Z SURFACE )
G65 P9510 X-1.0041 Y2.7631
G65 P9510 Z12.5
G65 P9511 Z11.6793
G65 P9510 Z13.6743
(CHECK FOR LOAD HEIGHT ERROR)
IF[#142GT.004]GOTO600
(STORE POINT 1)
G65 P9534
(PROTECTED POSITIONING)
G65 P9510 X-2.2511 Y-1.8909 Z13.6743
( PROBE Z SURFACE )
G65 P9510 X-2.2511 Y-1.8909
G65 P9510 Z12.5
G65 P9511 Z11.6793
G65 P9510 Z13.6743
(COMPARE POINT 2)
G65 P9534 Z0.
IF[#137LE.0005]GOTO350
GOTO600
N350
IF[#137GE-.0005]GOTO400
GOTO600
(REJECT PALLET)
N400
(PROTECTED POSITIONING)
G65 P9510 X-1.8909 Y-2.2511 Z13.6743
( PROBE Z SURFACE )
G65 P9510 X-1.8909 Y-2.2511
G65 P9510 Z12.5
G65 P9511 Z11.6793
G65 P9510 Z13.6743
(CHECK FOR LOAD HEIGHT ERROR)
IF[#142GT.004]GOTO600
(STORE POINT 1)
G65 P9534
(PROTECTED POSITIONING)
G65 P9510 X2.7631 Y-1.0041 Z13.6743
( PROBE Z SURFACE )
G65 P9510 X2.7631 Y-1.0041
G65 P9510 Z12.5
G65 P9511 Z11.6793
G65 P9510 Z13.6743
G65 P9533 ( PROBE OFF )
G49 G53 Z0
G5.1 Q1
G91 G28 Y0.
G90
(COMPARE POINT 2)
G65 P9534 Z0.
IF[#137LE.0005]GOTO450
GOTO600
N450
IF[#137GE-.0005]GOTO500
N600(PARTS MISLOADED)
T0M6
M68(REJECT PALLET)
M98P1(START PROGRAM)
M01
N500(PARTS LOADED CORRECTLY)
M99(RETURN TO PART PROGRAM)
M30

  • Like 2
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...