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 pro 5


Recommended Posts

  • 1 month later...
  • 2 weeks later...

#100=#3011 (Stores date)

#101=#100 (Keeps date correct in #100 for checking)

#1=FIX[#101/10000] (Separate Year)

#101=#101-[#1*10000]

#2=FIX[#101/100] (Separate Month)

#101=#101-[#2*100]

#3=FIX[#101] (Separate Day)

 

(DATE FORMAT #2/#3/#1 MM/DD/YYYY)

Yep this, EXCEPT you'll probably need to do more fixes and separate out all the digits:

02/14/2015 would be

#1=0

#2=2

#3=1

#4=4

#5=2

#6=0

#7=1

#8=5

 

 You'll then need an alphabet macro which contains any characters (in your case you need a 0-9 and the "/" or "." depending on how you want to separate the mm/dd/yyyy) List them beside their ascii character code is best.

So that macro will look something like:

%

O1234(ALPHABET CHARACTERS)

G91

(WHATEVER LOGIC YOU WANT TO CHECK VALIDITY OF INPUT)

GOTO#1 (GOTO WHATEVER CHARACTER SPECIFIED BY "A")

 

N0(ZERO)

INCREMENTAL ENGRAVING CODE FOR "0"

MOVE ENGRAVER TO BOTTOM LEFT OF NEXT LETTER

G90(THIS IS NOT NECESSARY BUT GUARANTEES YOU GO BACK TO G90 MODE AFTER LAST LETTER, EVEN IF YOU FORGET IN MAIN PROGRAM)

M99

 

N1(ONE)

INCREMENTAL ENGRAVING CODE FOR "1"

MOVE ENGRAVER TO BOTTOM LEFT OF NEXT LETTER

G90

M99

 

...

...

N9(NINE)

INCREMENTAL ENGRAVING CODE FOR "2"

MOVE ENGRAVER TO BOTTOM LEFT OF NEXT LETTER

G90

M99

 

N11(SLASH) (I'M USING N11 AS AN ARBITRARY EXAMPLE)

INCREMENTAL ENGRAVING CODE FOR "/"

MOVE ENGRAVER TO BOTTOM LEFT OF NEXT LETTER

G90

M99

%

***************make sure width of all character is the same and the space you move right by to next letter is constant*****************

 

Once you have this character macro and have determined the date format based on SSE_'s advice in your main program you can put:

T7M6 (GET ENGRAVING TOOL)

#09=____(X LOCATION OF BOTTOM LEFT OF FIRST CHARACTER IN RELATION TO WORK COORDINATE SYSTEM)

#10=____(Y LOCATION OF BOTTOM LEFT OF FIRST CHARACTER IN RELATION TO WORK COORDINATE SYSTEM)

#11=____(Z LOCATION OF BOTTOM LEFT OF FIRST CHARACTER IN RELATION TO WORK COORDINATE SYSTEM)

G52X#09Y#10Z#11(CREATE LOCAL COORDINATE SYSTEM FOR ENGRAVING LINE)

 

G0G90G54(OR G54.1P_) X0Y0S3000M303M8 (SPINDLE ON, RAPID TO BOTTOM LEFT OF FIRST LETTER)

G43H1Z.250M302 (RAPID TO WHATEVER HEIGHT ABOVE PART YOUR CHARACTER MACRO DEPENDS ON TO GET PROPER DEPTH)

G65P1234A#01 (CALL ENGRAVING OF FIRST CHARACTER)

G65P1234A#02 (CALL ENGRAVING OF 2ND CHARACTER)

G65P1234A#11 (CALL ENGRAVING OF "/")

G65P1234A#03 (CALL ENGRAVING OF 3RD CHARACTER)

G65P1234A#04 (CALL ENGRAVING OF 4TH CHARACTER)

G65P1234A#11 (CALL ENGRAVING OF "/")

G65P1234A#05 (CALL ENGRAVING OF 5TH CHARACTER)

G65P1234A#06 (CALL ENGRAVING OF 6TH CHARACTER)

G65P1234A#07 (CALL ENGRAVING OF 7TH CHARACTER)

G65P1234A#08 (CALL ENGRAVING OF 8TH CHARACTER)

G52X0.Y0.Z0. (CANCEL LOCAL COORDNATE SYSTEM

 

DO THE REST OF YOUR MAIN PROGRAM

 

You can get fancier with this if you want.  You can make your alphabet parametric so it can have variable character heights and aspect ratios (also passed into the character macro).

You can check the time of day to determine what shift the part was run on and engrave something to represent that.

You can change the date to Julian date if you want instead of Gregorian.

 

Gluck.

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