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:

Need help with sequential engraving macro


Recommended Posts

I'm new to code but not mastercam and need to know how to get my engraving code to work on an old haas vf-2. I really don't know what I'm doing here and need this code changed or explained to me so I know why it's not working. The error is "invalid gcode" and here's the code:

%
O0105
(AR15 ENGRAVING)
(DATE=DD-MM-YY - 13-03-18 TIME=HH:MM - 14:35)
(MCX FILE - D:\CAMPBELL ARMS\AR15\LOWER RECEIVER PART 1 CORRECT 2.MCAM)
(NC FILE - E:\FOLDER4\SEND.TXT)
(MATERIAL - ALUMINUM INCH - 7075)
(T17|0.25 ENGRAVING BIT|H17|D17|TOOL DIA. - .25)
N100 G20
N110 G0 G17 G40 G49 G80 G90
N120 T17 M6
N130 G0 G90 G54 X.568 Y-1.545 S6112 M3
N140 G43 H17 Z1.3505
N150 M8
N160 G47 P0 (CAM-00####) X2 Y2 I90 J0.5 R0.1 Z-0.001 F30 E10
N170 G0 Z1.3505
N180 M5
N190 G91 G28 Z0. M9
N200 G28 Y0.
N210 M30
%

 

The machine stops at N160 G47 for the invalid gcode pop up. I appreciate any help I can get on this!

Link to comment
Share on other sites
  • 4 weeks later...
I don't think you can have literal text and serialization on the same line.  Try this format, it works for our shop. 
note: your machine might use different common variable for sequential engraving, some of our machines use #599 others use #10599

%
O0105
(AR15 ENGRAVING)
(DATE=DD-MM-YY - 13-03-18 TIME=HH:MM - 14:35)
(MCX FILE - D:\CAMPBELL ARMS\AR15\LOWER RECEIVER PART 1 CORRECT 2.MCAM)
(NC FILE - E:\FOLDER4\SEND.TXT)
(MATERIAL - ALUMINUM INCH - 7075)
(T17|0.25 ENGRAVING BIT|H17|D17|TOOL DIA. - .25)
N100 G20
N110 G0 G17 G40 G49 G80 G90
N120 T17 M6
N130 G0 G90 G54 X.568 Y-1.545 S6112 M3
N140 G43 H17 Z1.3505
N150 M8
N160 G47 P0 (CAM-00) X2. Y2. I90. J0.5 R0.1 Z-0.001 F30. E10.   (G47P0 = TEXT)
N170 G0 Z1.3505
N171 X2. Y3.							(<====== START LOCATION FOR SERIALIZE)
N172 G47 P1 (####) X2. Y3. I90. J0.5 R0.1 Z-0.001 F30. E10.	(G47P1 = SERIALIZE) (set #599 = start number)
N173 G0 Z1.3505
N180 M5
N190 G91 G28 Z0. M9
N200 G28 Y0.
N210 M30
%
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...