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:

Coolant - Air blow


kccadcam
 Share

Recommended Posts

Back again,,,,

quote:

Mpmaster for X MR1/SP2 and above. It's our master configurable 4-Axis G-Code post. Rotary settings are configured in the Machine Definition.

Configuring Matsuura H600 cell post.

I have created:

code:

 

#( )======================================

#*>=========================<***************************************

#( COOLANT AIRBLOW COMMANDS )======================================

#*>=========================<***************************************

#( )======================================

 

ptool_airblast

n$, "M52", "(AIR BLAST ON)" ,e$

n$, "G4 X9.5" ,e$

n$, "M53", "(AIR BLAST OFF)" ,e$

 


I,m trying to insert:

---> if prv_coolant$ = 3, ptool_airblast <---

into pretract when coolant-tool is shut off.

Cannot get it recognize prv_coolant??

I think it is conflicting with the new x-coolant stuff....

 

Anybody care to steer me in the right direction??

Here is my pretract:

code:

 pretract        #End of tool path, toolchange              

sav_absinc = absinc$

absinc$ = one

sav_coolant = coolant$

coolant$ = zero

# if nextop$ = 1003, #Uncomment this line to leave coolant on until eof unless

# [ # explicitely turned off through a canned text edit

if all_cool_off,

[

#all coolant off with a single off code here

if coolant_on, pbld, n$, *sall_cool_off, e$

coolant_on = zero

]

else,

[

local_int = zero

coolantx = zero

while local_int < 20,

[

coolantx = and(2^local_int, coolant_on)

local_int = local_int + one

if coolantx > zero,

[

coolantx = local_int

pbld, n$, scoolantx, e$

]

coolantx = zero

]

coolant_on = zero

]

# ]

#cc_pos is reset in the toolchange here

cc_pos$ = zero

if convert_rpd$ = 1,

[

gcode$ = 1

feed = maxfeedpm

ipr_type = 0

]

else, gcode$ = zero

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

pbld, n$, sgabsinc, sgcode, "G28", "Z0.", [if gcode$ = 1, `feed], scoolant, e$

#if lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$

#pbld, n$, "G28", "X0.", "Y0.", protretinc, e$

#if lock_codes = one & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$

if abs(fmtrnd(cabs)) > 360 & nextop$ <> 1003,

[

if lock_codes = one, pbld, n$, *sunlock, e$

rotretflg = 1

pbld, n$, 'G28', protretinc, e$

rotretflg = 0

if lock_codes = one & cuttype = 0, pbld, n$, *slock, e$

]

absinc$ = sav_absinc

coolant$ = sav_coolant

"G49", e$

pbreak, e$

Link to comment
Share on other sites

How about trying this instead.

 

It looks like you are trying to create a post block why not just handle it in the pretract section like so. Insert this after the off coolant call.

 

code:

 if prv_coolant$ = 3,

[

n$, "M52", "(AIR BLAST ON)" ,e$

n$, "G4 X9.5" ,e$

n$, "M53", "(AIR BLAST OFF)" ,e$

]

Are you sure its not seeing the if prv_coolant$

and is not picking up the post block instead?

Link to comment
Share on other sites

code:

 if prv_coolant$ = 3,

[

n$, "M52", "(AIR BLAST ON)" ,e$

n$, "G4 X9.5" ,e$

n$, "M53", "(AIR BLAST OFF)" ,e$

]

That's exactly what I started with....

I cannot get it to accept the prv_ command.

 

If I say:

code:

 if coolant$ = 3 

it will output on the previous tool....

 

Stumped...........

Link to comment
Share on other sites

Dumb question,

 

Is the prv_coolant$ being set immediately after the coolant call in the ptlchg sections?

 

Then after it's used at the end of the pretract section you might want to zero it back out just for s/g's

 

Can you post the section where the prv_coolant is being set?

Link to comment
Share on other sites

I don't know much about the new coolant stuff... but you can try this in the ptoolend postblock;

 

code:

ptoolend$        #End of tool path, before reading new tool data               

!speed, !spdir2

if nextop$ = 1002,

[

if prv_coolant$ = 3,

[

n$, "M52", "(AIR BLAST ON)" ,e$

n$, "G4 X9.5" ,e$

n$, "M53", "(AIR BLAST OFF)" ,e$

]

]

Link to comment
Share on other sites

This is from the end of ptlchg_com:

 

code:

 if nexttool = first_tool$,

pbld, n$, "G43", *tlngno$, pfzout, scoolant,[if coolant$ = 3,"(HP COOLANT)"], "T0", e$

else, pbld, n$, "G43", *tlngno$, pfzout, scoolant,[if coolant$ = 3,"(HP COOLANT)"], next_tool$, e$

sav_coolant = coolant$

if coolant$ = 1, sm09 = sm09_0

if coolant$ = 2, sm09 = sm09_1

if coolant$ = 3, sm09 = sm09_2

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

plast

this is my current pretract:

code:

 pretract        #End of tool path, toolchange              

sav_absinc = absinc$

absinc$ = one

sav_coolant = coolant$

coolant$ = zero

# if nextop$ = 1003, #Uncomment this line to leave coolant on until eof unless

# [ # explicitely turned off through a canned text edit

if all_cool_off,

[

#all coolant off with a single off code here

if coolant_on, pbld, n$, *sall_cool_off, e$

coolant_on = zero

]

else,

[

local_int = zero

coolantx = zero

while local_int < 20,

[

coolantx = and(2^local_int, coolant_on)

local_int = local_int + one

if coolantx > zero,

[

coolantx = local_int

pbld, n$, scoolantx, e$

]

coolantx = zero

]

coolant_on = zero

]

# ]

#cc_pos is reset in the toolchange here

cc_pos$ = zero

if convert_rpd$ = 1,

[

gcode$ = 1

feed = maxfeedpm

ipr_type = 0

]

else, gcode$ = zero

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

pbld, n$, sgabsinc, sgcode, "G28", "Z0.", [if gcode$ = 1, `feed], scoolant, e$

#if lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$

#pbld, n$, "G28", "X0.", "Y0.", protretinc, e$

#if lock_codes = one & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$

if abs(fmtrnd(cabs)) > 360 & nextop$ <> 1003,

[

if lock_codes = one, pbld, n$, *sunlock, e$

rotretflg = 1

pbld, n$, 'G28', protretinc, e$

rotretflg = 0

if lock_codes = one & cuttype = 0, pbld, n$, *slock, e$

]

absinc$ = sav_absinc

if prv_coolant$ = 3, <----------NEW

[

n$, "M52", "(AIR BLAST ON)" ,e$

n$, "G4 X9.5" ,e$

n$, "M53", "(AIR BLAST OFF)" ,e$

]

coolant$ = sav_coolant

"G49", e$

pbreak, e$

Link to comment
Share on other sites

Is prv_coolant$ a varaiable you created?

 

If so, try dropping the $ at the end of it.

 

Also , where is it set?

 

somewhere there should be

prv_coolant = coolant$

Link to comment
Share on other sites

long way of doing it but I got it to work..thanks for the idea.

 

code:

pretract        #End of tool path, toolchange              

sav_absinc = absinc$

absinc$ = one

sav_coolant = coolant$

if prv_coolant$ = 3,

[

coolant$ = zero

peck1$ = zero

#cc_pos is reset in the toolchange here

cc_pos$ = zero

gcode$ = zero

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

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

ptool_airblast #KC addon

absinc$ = sav_absinc

coolant$ = sav_coolant

]

else,

[

coolant$ = zero

peck1$ = zero

#cc_pos is reset in the toolchange here

cc_pos$ = zero

gcode$ = zero

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

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

absinc$ = sav_absinc

coolant$ = sav_coolant

]

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