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:

verification macro


Recommended Posts

Hi,

 

We have a horizontal machining center that runs the same part on two different machine tables. So the machine has a shuttle and shuttles one table in, runs the part, shuttles the other table in, runs a like part but different fixture, then starts over.

 

The problem we have is when someone starts the program over it could pick up the wrong work offsets (we've tried to make the work offsets the same between the two pallets so we wouldn't have to worry about that, etc., but to no avail).

 

There has to be a way that you could write some macros that would direct the program to the correct work offsets. Using common variables or some other kind of variables, I don't know. Something like IF#101EQ1GOTO900 (2nd set of work offsets). So that could be at the beginning of the program, with work offsets for both parts at the beginning of the program, it would jump over the one it doesn't need. Then I only have to have one program. Then at the bottom of the program it can activate a "counter" or something that switches the 1 to a zero. Does that make any sense or am I crazy? Can anyone give me some direction with this?

 

Any help is appreciated. Thanks.

Link to comment
Share on other sites

It's a Mazak M32. I think I can just do something like this:

 

 

(AT BEGINNING OF PROGRAM:)

 

N30M#100

N40G90G94G20G0

N50IF[#100EQ46]GOTO140

N60IF[#100NE45]GOTO210

N70G90G94G20G0

N80(TABLE--1)

N90G10L2P1X0.000Y-24.0920Z-20.5150B0.000

N100G10L2P2X0.0000Y-24.0920Z-20.5150B0.000

N110G10L2P3X0.0Y-24.0920Z-20.5150B0.000

N120G10L2P4X0.0Y-24.0920Z-20.5150B0.000

N130GOTO220

N140G90

N150(TABLE--2)

N160G10L2P1X0.000Y-24.0920Z-20.5150B0.000

N170G10L2P2X0.0Y-24.0920Z-20.5150B.000

N180G10L2P3X0.0Y-24.0920Z-20.5150B0.000

N190G10L2P4X0.0000Y-24.0920Z-20.5150B.000

N200GOTO220

N210(COMMON-VARIABLE-ERROR)

 

 

(AT END OF PROGRAM:)

 

N2060G90

N2070G10L2P1X0Y0Z0B0

N2080G10L2P2X0Y0Z0B0

N2090G10L2P3X0Y0Z0B0

N2100G10L2P4X0Y0Z0B0

N2110#100=[#100+1]

N2120IF[#100LE46]GOTO2140

N2130#100=45

N2140M160

N2150M99

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

On our horizontals #1000=1 means pallet A is in the working position.

#1001=1 is for pallet B.

 

N1 G91 G30 X0 Y0 Z0

#153=1

WHILE[#910EQ1]DO1

IF[#1000NE1]GOTO99003 <<<<<<<<<<<<<<<<<<<<<

GOTO601

END1

WHILE[#910EQ2]DO1

IF[#1001NE1]GOTO99003

GOTO601

END1

N601 IF[#10004GT13.75]GOTO99001

M06 T104 (4" LONG OMP400 PROBE)

 

.

.

.

.

 

G91 G28 B0

IF[#915EQ4]GOTO110

IF[#913NE3]GOTO108

GOTO104

G90 G53

N110

/GOTO108 (END PROGRAM)

M99 P101

N99001 #3000=1(TOOL LENGTH IS TOO LONG)

N99002 #3000=2(TOOL LENGTH IS TOO SHORT)

N99003 #3000=3(WRONG PALLET IS IN WORK AREA) <<<<<<<<<<<<<<<<

N108 M30 (END PROGRAM)

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