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:

Makino A51 pallet recognition macro


Recommended Posts

Hello Dudes and Dudettes,

My program has a main program we will call O8130 for preparatory commands and a sub O8032 used exclusively for maching and verifying the program completed it full cycle 520=0 at the beginning then 520=3 at the end. If tool breaks or machine goes into alarm state then 520 will not equal 3 and program O8003 scrap out program gets called up to drill a couple holes in the part so operator will then be forced to put them in the dumpster. What I need help with is a macro in the O8003 program that will recognize the pallet as being either 1 or 2 and alarming out if the pallet has been indexed front to back to eliminate the O8003 program from drilling two holes in perfectly good parts by recognizing the pallet is not the pallet that the machine did not fully complete  the machining cycle on. On occasion an operator will index pallets eg. M60 and the O8003 program has yet to drill the parts that are scrap or unfinished parts due to tool breakage or alarming out. So when they reset and hit cycle start I need the Makino to recognize the pallet that has the unfinished or damaged parts to either be in the correct position or if the operator has M60d the Makino will recognize the pallet is wrong and alarm out.

Please Help

Rob

Link to comment
Share on other sites

M462 Pallet No. Send
   □Program
     M462;
     G53;

   □Explanation
     Sends the number of the pallet loaded on the machine table to macro variable #100.
     In case the 4-face program automatic assignment function is provided, the face number is also sent to #101.
     After M462, A dummy block for preventing pre-reading such as G53 must be inserted before reading #100 or #101.

Edited by zhaohai
Link to comment
Share on other sites
  • 4 months later...

I actually wrote a simple pallet change macro that also referenced G53 for desired pallet face orientation. We don't use it, I was just messing around with macros back then. Hope you're enjoying your a51!

O7779 (PALLET CHANGING MACRO)

(#650 SPECIFY DESIRED PALLET NUMBER)

#650 =1 (1=TOMBSTONE 1, 2=TOMBSTONE 2)

(#651 SPECIFY DESIRED PALLET ORIENTATION)

#651 =1 (1=0 2=90 3=180 4=270)

(DO NOT ALTER BELOW THIS LINE)

M462

G53

#652 = #100

IF [#650 GT 2] THEN GOTO 3

IF [#650 LT 1] THEN GOTO 4

IF [#650 EQ #0] THEN #3000=101(NO VALUE SET IN #650)

IF [#651 GT 4] THEN GOTO 5

IF [#651 LT 1] THEN GOTO 6

IF [#651 EQ #0] THEN #3000=101(NO VALUE SET IN #651)
 
IF [#652 EQ #650] THEN GOTO 1

IF [#652 NE #650] THEN GOTO 2

N1 (PALLET READY)

IF [#651 EQ 1] THEN GOTO 100

IF [#651 EQ 2] THEN GOTO 200

IF [#651 EQ 3] THEN GOTO 300

IF [#651 EQ 4] THEN GOTO 400

M30

N2 (PALLET CHANGES AND VARIABLE UPDATES)

M60

#652 =#650

IF [#651 EQ 1] THEN GOTO 100

IF [#651 EQ 2] THEN GOTO 200

IF [#651 EQ 3] THEN GOTO 300

IF [#651 EQ 4] THEN GOTO 400

M30

(ALARM MESSAGES)

N3

#3000=101(#650 PALLET NUMBER SPECIFIED TOO LARGE)

M30

N4

#3000=101(#650 PALLET NUMBER SPECIFIED TOO SMALL)

M30

N5

#3000=101(#651 ORIENTATION NUMBER SPECIFIED TOO LARGE)

M30

N6

#3000=101(#651 ORIENTATION NUMBER SPECIFIED TOO SMALL)

M30

(B AXIS ORIENTATIONS)

N100

M11

G00G90G53B0.0

M10

M30

N200

M11

G00G90G53B90.0

M10

M30

N300

M11

G00G90G53B180.0

M10

M30

N400

M11

G00G90G53B270.0

M10

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

This might be an easier way. If this is a Fanuc control that is. The inputs and variables may be  different but the concept is the same.

 

This subject came up as a way to check, from inside a program, whether the correct pallet is in the machining area when a particular program is run. Keep in mind that this is for a horizontal machining center. The macro variables may be off by one or two digits and need to be checked on each machine model. They may very well be the same but need to be checked. You will need to look in your ladder and check for 2 inputs. Basically, you will look for inputs named UI1008 and UI1009. They set pallets 1 and 2 depending on which pallet is in position. They also set macro variables #1008 and #1009. The change to your programs will constitute checking these 2 variables for their proper states. I have made changes to the following program to highlight this.

 

%

O4050

G20

G0G17G40G49G80G90

T1M6

IF[#1009EQ1]GOTO100 (FOR PALLET 1 CHECK, IF 1, CONTINUE WITH PROGRAM)

IF[#1009EQ0]GOTO900 (FOR PALLET 1 CHECK, IF 0, GO TO ALARM AT END OF PROGRAM)

N100

G0G90G54X3.198Y-2.9025S5093M3

T2

G5.1Q0

G43H1Z2.

Z1.

G1Z.399F20.

 

BODY OF PROGRAM

 

G1 X3.198

Z1. F50.

G0 Z2.

M5

G91 G28 Z0.

G28 X0. Y0.

N900

#3000=1(WRONG PALLET LOADED)

M30

%

 

#1009 will be changed to #1008 to check pallet #2. This bit of code will go into the portion of your program that runs pallet #2. This can be used once per program or once per tool, however you feel you need to check this.

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

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