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:

Post Help


Sandybar
 Share

Recommended Posts

My post outputs "coolant off" and "air off" if the next operation is differnet than the current coolant operation.

 

Example below.....

 

N106G0G90G54X3.446Y-3.475A90.S853M3

N108G43H6Z1.1M08T7

 

N118G91G28Z0.M59

N120M100

N122M01

(TOOL - 7 DIA. OFF. - 7 LEN. - 7 DIA. - .375)

N124T7M6

N126G0G90G54X3.446Y-3.475A90.S1018M3

N128G43H7Z1.1M51T8

 

N136M5

N138G91G28Z0.M09

N140M100

N142M01

( #A DRILL TOOL - 8 DIA. OFF. - 8 LEN. - 8 DIA. - .375)

N144T8M6

N146G0G90G54X3.446Y-3.475A90.S814M3

N148G43H8Z1.1M08T6

 

Notice in the first tool coolant on "M08" and coolant off is "M59" but the next operation is for air....The next operation is for coolant....If all operations use air or coolant it codes just fine....but if I switch it codes out almost backwards....

 

Here is what my post looks like....

 

# Coolant M code selection

sm09 M09 #Coolant Off

sm08 M08 #Coolant Flood

sm08_1 M51 #Coolant Mist

sm08_2 M88 #Coolant Tool-High Pressure

sm09_0 M09 #Coolant Flood Off

sm09_1 M59 #Coolant Mist Off

sm09_2 M89 #Coolant Tool Off

scoolant #Target for string

 

Okay what gives?

Link to comment
Share on other sites

Here it is

 

pretract #End of tool path, toolchange

sav_absinc = absinc

absinc = one

sav_coolant = coolant

coolant = zero

if sav_coolant = 1, coolant = 0

if sav_coolant = 2, coolant = 5 #Mist off

if sav_coolant = 3, coolant = 6 #Tool off

#cc_pos is reset in the toolchange here

cc_pos = zero

gcode = zero

if prv_mi6=1,pccrloff

pbld, n, sccomp, *sm05, psub_end_mny, e

pbld, n, sgabsinc, sgcode, *sg28ref, "Z0.", scoolant, e

pbld, n, "M100", e

absinc = sav_absinc

coolant = sav_coolant

Link to comment
Share on other sites

try this instead:

 

code:

pretract #End of tool path, toolchange 

sav_absinc = absinc

absinc = one

sav_coolant = coolant

result = prv_coolant # <=== ADDED

coolant = zero

if result = 1, coolant = 0 # <=== CHANGED

if result = 2, coolant = 5 #Mist off <=== CHANGED

if result = 3, coolant = 6 #Tool off <=== CHANGED

#cc_pos is reset in the toolchange here

cc_pos = zero

gcode = zero

if prv_mi6=1,pccrloff

pbld, n, sccomp, *sm05, psub_end_mny, e

pbld, n, sgabsinc, sgcode, *sg28ref, "Z0.", scoolant, e

pbld, n, "M100", e

absinc = sav_absinc

coolant = sav_coolant


Should work for you.

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