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 on & off


Recommended Posts

I'm trying to modify the latest mpmaster for our mazak 700 vertical mill. Instead of outputting "M8" 7 "M9", for coolant commands, its coding "on" & "off", respectively.

According to the Debugger, "on" is being output by this:

if suppress <> 1, #Don't output an on code for a coolant that is already on          [          if not(frac(cantext$/two)), coolant_on = coolant_on + coolant_bin #Maintain binary sum of all coolants currently on          coolantx = cantext$ - 50                                          #Create a coolantx value for string select          pbld, n$, *scoolantx, e$          ]

And "off" is being output by this:

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          ]

Can anyone point me in the right direction to get it to out put the M8 & M9 codes?

 

 

 

 

Link to comment
Share on other sites

That output is coming from the X Style Coolant, String Select tables.

 

Search for 'scoolantx' in the post. You are looking for the location where it is defined, not where it is output. That variable is defined as the last variable, in a list of coolant variables. (Technically, it is defined as the next variable, after the implied array)

 

The list above 'scoolantx' has a series of string variables in the left column. Each coolant variable in the list actually has an "on" variable, and an "off" variable. The off string is first, then the on string is next. This repeats ten times, meaning that there are 20 total strings above 'scoolant'.

 

You need to edit the string variable definitions, which are to the right of the colon (:), and in between the set of quotes.

 

"Coolant 6 (on)" becomes "M7", or whatever your specific code is.

Link to comment
Share on other sites

That output is coming from the X Style Coolant, String Select tables.

 

Search for 'scoolantx' in the post. You are looking for the location where it is defined, not where it is output. That variable is defined as the last variable, in a list of coolant variables. (Technically, it is defined as the next variable, after the implied array)

 

The list above 'scoolantx' has a series of string variables in the left column. Each coolant variable in the list actually has an "on" variable, and an "off" variable. The off string is first, then the on string is next. This repeats ten times, meaning that there are 20 total strings above 'scoolant'.

 

You need to edit the string variable definitions, which are to the right of the colon ( :), and in between the set of quotes.

 

"Coolant 6 (on)" becomes "M7", or whatever your specific code is.

I defined them, but I'm still getting the same output. This is my table:

fstrsel sm09 coolant$ scoolant 7 -1# --------------------------------------------------------------------------# Coolant output code selection for X style coolant# Note: To enable X style coolant, click on the General Machine Parameters icon#   in the Machine Definition Manager, Coolant tab, disable first check box#   Output of X style coolant commands in this post is controlled by pcan, pcan1, & pcan2#   This string select is setup using the "Coolant Commands" tab in the "General Machine Parameters"scool50 : "M8"                 #Coolant 1 on valuescool51 : "M9"                 #Coolant 1 off valuescool52 : "M7"                 #Coolant 2 on valuescool53 : "M9"                 #Coolant 2 off valuescool54 : "M51"                #Coolant 3 on valuescool55 : "M9"                 #Coolant 3 off valuescool56 : "M8(Coolant4=ON)"    #Coolant 4 on valuescool57 : "M9(Coolant4=OFF)"   #Coolant 4 off valuescool58 : "M8(Coolant5=ON)"    #Coolant 5 on valuescool59 : "M9(Coolant5=OFF)"   #Coolant 5 off valuescool60 : "M8(Coolant6=ON)"    #Coolant 6 on valuescool61 : "M9(Coolant6=OFF)"   #Coolant 6 off valuescool62 : "M8(Coolant7=ON)"    #Coolant 7 on valuescool63 : "M9(Coolant7=OFF)"   #Coolant 7 off valuescool64 : "M8(Coolant8=ON)"    #Coolant 8 on valuescool65 : "M9(Coolant8=OFF)"   #Coolant 8 off valuescool66 : "M8(Coolant9=ON)"    #Coolant 9 on valuescool67 : "M9(Coolant9=OFF)"   #Coolant 9 off valuescool68 : "M8(Coolant10=ON)"   #Coolant 10 on valuescool69 : "M9(Coolant10=OFF)"  #Coolant 10 off valuescoolantx : ""                    #Target for stringfstrsel scool50 coolantx scoolantx 20 -1# --------------------------------------------------------------------------#X coolant has the option - First coolant off command shuts off ALL coolant optionssall_cool_off  : "M9" #Coolant off command output with all_cool_off

Do I have it correct?

 

Zeke

Link to comment
Share on other sites

Using the debugger, it appears the On is being output by the pcant_out section. The section doesn't appear to have any logic that deals with whether before, with or after is selected in the operation's coolant dialog. Could that be the problem?

Looking closer, the section does have logic that deals with the different selections.

I'm not very good at this stuff :help:

Link to comment
Share on other sites

Ok, for Coolant, there are basically two different "modes" you can be using. There is "V9 Coolant (old)", and "X-Style Coolant (new)".

 

The selection between the modes is done in the Machine Definition Manager > General Machine Parameters > Coolant settings tab.

 

The first check box "Support coolant using.........." is the switch that toggles between "V9 coolant" and "X-style" coolant. If the check box is enabled, you are using V9 coolant.

 

 

Since your debugger is telling you that "pcant_out" is outputting your coolant, it is safe to assume that you are using X Style Coolant.

 

With X-Style coolant, there is another "Toggle" option: "First coolant off command shuts off all coolant". That check box tells MP to use the "sall_cool_off" string for any of the "off" commands.

 

If that checkbox is not enabled, then the 'scoolantx' is responsible for outputting the "on" coolant codes, and the "off" coolant codes.

 

 

It looks like you've got everything setup correctly.

 

My guess is that you've got a copy of the post processor that you are running, inside the same folder where you Mastercam file lives. If that is the case, that Post will override the post that is in your "Shared mcamx_\mill\posts folder.

 

Do this: put your modified copy of MPMaster in another folder. (could be anywhere, "My documents", or "Desktop" work well.)

 

Now go to your Mastercam file, select the operations you want to post and hit the "G1" button. In the Post Processing Dialog box, press CTRL + ALT + SHIFT + "P" on the keyboard. That will activate the "Post selection" button. Press that button, and browse to the post you have modified.

 

Now when you post, you can be sure that MP is using "your" post processor, and not another one by mistake...

 

Again, make sure that your Mastercam MCX file is not located inside a folder with Mill Post inside it...

Link to comment
Share on other sites

I've got the post in the default folder with my other posts & the MC file in a completely different folder. I have "Support coolant using coolant value in post-processor" unchecked & "First coolant off command shuts off ALL coolant options" checked.

I'm sure the post I'm working on is the one being used by the file, because I've been trying different things to fix this & reposting the file reflects my changes. I'm scratching a hole in my head here, mostly because I only know enough about this to be dangerous. Thank goodness for the undo button in MC code expert. :)

Link to comment
Share on other sites

This is how it is outputting:
 
(REAM DOWEL HOLES)
N1 T22 M06 (1/4" 6 FLUTE REAMER)
On
G0 G17 G90 G59 X26.875 Y.5281 S500 M3
G43 H22 Z1. T19
G94
G98 G81 Z-1.2 R0. F5.
X24.375
X4.125
X1.625
G80
Off
M5
G91 G28 Z0.
M1

 

As near as I can tell, it should output this:

 

(REAM DOWEL HOLES)
N1 T22 M06 (1/4" 6 FLUTE REAMER)
G0 G17 G90 G59 X26.875 Y.5281 S500 M3
G43 H22 Z1. M8 T19
G94
G98 G81 Z-1.2 R0. F5.
X24.375
X4.125
X1.625
G80
M9
M5
G91 G28 Z0.
M1

Link to comment
Share on other sites

I have ran into the exact same problem. My not so elegant solution (but effective) was to make my coolant "chart" look like so...

t9d5b8.jpg

 

my coolant table looks like this:

 

# --------------------------------------------------------------------------
# Coolant output code selection for X style coolant
# Note: To enable X style coolant, click on the General Machine Parameters icon
#   in the Machine Definition Manager, Coolant tab, disable first check box
#   Output of X style coolant commands in this post is controlled by pcan, pcan1, & pcan2
#   This string select is setup using the "Coolant Commands" tab in the "General Machine Parameters"
scool50 : ""    #Coolant 1 on value
scool51 : ""    #Coolant 1 off value
scool52 : ""    #Coolant 2 on value
scool53 : ""    #Coolant 2 off value
scool54 : ""    #Coolant 3 on value
scool55 : ""    #Coolant 3 off value
scool56 : ""    #Coolant 4 on value
scool57 : ""    #Coolant 4 off value
scool58 : ""    #Coolant 5 on value
scool59 : ""    #Coolant 5 off value
scool60 : ""    #Coolant 6 on value
scool61 : ""    #Coolant 6 off value
scool62 : ""    #Coolant 7 on value
scool63 : ""    #Coolant 7 off value
scool64 : ""    #Coolant 8 on value
scool65 : ""    #Coolant 8 off value
scool66 : ""    #Coolant 9 on value
scool67 : ""    #Coolant 9 off value
scool68 : ""    #Coolant 10 on value
scool69 : ""    #Coolant 10 off value
scoolantx : ""                    #Target for string

fstrsel scool50 coolantx scoolantx 20 -1

 

Actually this way works pretty good for our purposes. I have a dozen or so machines that are controlled by this one post. All seem to have their unique coolant codes. If it were in the post, controlling the on & off codes would require a different approach.

Link to comment
Share on other sites

So not a guru,

 

The method I described before should work for you. Your string values should go into the string select table.

 

Are you 100% sure that the post you are editing is the post that is outputting your data? I don't think it is.

 

Do this:

 

Go into the 'psof$' section of your post. Find the Tool Change command (line with the "M06" in it).

 

Just before that line, put in a new line of output code:

 

"DEBUG POST TEST", e$

 

Nothing fancy, just testing to be sure that the post you are editing is the one actually outputting your coolant. There are several ways that a post selection can be "overridden". Let's be sure you are posting out with the post you are editing.

 

Another way to test this:

 

Take a copy of your MD, CD, and PST files, and rename them all the exact same name, that is completely unique:

 

MY_FANUC_TEST_WHATEVER.MMD-9

MY_FANUC_TEST_WHATEVER.Control-9

MY_FANUC_TEST_WHATEVER.PST

 

Then make sure they are all linked together properly. Do a "replace" on your MMD in your Mastercam file, to be sure you are linked to the correct files.

 

You've got something weird going on for sure. Editing the String Select Table for "X Style Coolant", should be the only thing you have to do, besides making sure that both check boxes are not checked in the Machine Definition > General Machine Parameters > Coolant Settings tab.

Link to comment
Share on other sites

Post debugger is your best friend when you're learning. Makes it much easier to trace exactly where each command in the NC output is coming from. Like they both said, unless there is something else going on, all you should have to do is change the lines in the coolant table as long as you have X style coolant enabled. I've only made 6 posts, so I'm no expert, but cannot express enough how useful debugger is for newbies.

Link to comment
Share on other sites

Post debugger is your best friend when you're learning. Makes it much easier to trace exactly where each command in the NC output is coming from. Like they both said, unless there is something else going on, all you should have to do is change the lines in the coolant table as long as you have X style coolant enabled. I've only made 6 posts, so I'm no expert, but cannot express enough how useful debugger is for newbies.

Oh yeah, I've been wearing that baby out. :whip:

 

Zeke

Link to comment
Share on other sites

So not a guru,

 

The method I described before should work for you. Your string values should go into the string select table.

 

Are you 100% sure that the post you are editing is the post that is outputting your data? I don't think it is.

 

Do this:

 

Go into the 'psof$' section of your post. Find the Tool Change command (line with the "M06" in it).

 

Just before that line, put in a new line of output code:

 

"DEBUG POST TEST", e$

 

Nothing fancy, just testing to be sure that the post you are editing is the one actually outputting your coolant. There are several ways that a post selection can be "overridden". Let's be sure you are posting out with the post you are editing.

 

Another way to test this:

 

Take a copy of your MD, CD, and PST files, and rename them all the exact same name, that is completely unique:

 

MY_FANUC_TEST_WHATEVER.MMD-9

MY_FANUC_TEST_WHATEVER.Control-9

MY_FANUC_TEST_WHATEVER.PST

 

Then make sure they are all linked together properly. Do a "replace" on your MMD in your Mastercam file, to be sure you are linked to the correct files.

 

You've got something weird going on for sure. Editing the String Select Table for "X Style Coolant", should be the only thing you have to do, besides making sure that both check boxes are not checked in the Machine Definition > General Machine Parameters > Coolant Settings tab.

Ok, I added the "DEBUG POST TEST", e$ line & it output just fine but the coolant is still just outputting as "On" & "Off".

 

I'm using the newest MPmaster version.

Link to comment
Share on other sites

So it looks like they've made a change to how MPMaster works now. Instead of just modifying the String Select table inside the post, there is logic that reads the values for all 10 different on/off values (20 parameters total), directly from the "Coolant Options" dialog inside the Machine Definition.

 

So when you make edits to the Post, that ends up not mattering, because when the Machine Definition data is read, then the post resets the values of those variables to the strings inside the Machine Definition.

 

So if you edit the "on" and "off" strings in the dialog (like MIL-TFP-41 showed), then you should be getting the correct output.

 

Do this:

 

  1. With Mastercam open, select "Machine Type > Design, then File > New". (Using the "Design" machine type makes sure that no Machine Def gets loaded into the Ops manager.)
  2. Go to Machine Definition Manager, and then browse to your Machine Definition.
  3. Open the "General Machine Parameters", and select the "Coolant options" tab.
  4. Set the String you want to use in the On/Off columns for each custom coolant command. Do this for only the strings you are going to use.
  5. For all other coolant strings, set them to "OP4-ON", "OP4-OFF", "OP5-ON", "OP6-OFF". Do this for all the strings you are not using. Make sure to put something unique in front of the "on" and "off" strings.
  6. After you make the edits to the Machine Definition, then Save that Machine Definition file.
  7. Completely restart Mastercam.
  8. Open your Mastercam file that is giving you issues.
  9. Open the Operations Manager > Machine Group Properties > Files Tab.
  10. Press the "Replace" button. Navigate to the Machine Definition you just saved. (it will be the same name)
  11. Force a Regeneration on all your operations.
  12. Now, open the operations, and go to the "Coolant" settings. (either the "button" or the coolant page in the tree)
  13. Check the values you have set. If necessary, you might have to set everything to "ignore", regenerate the operation, then change the coolant settings to be correct, and regenerate again.
  14. Post out the new program, and it should be using the correct coolant values.

 

If all that fails, once your Machine Definition is setup properly, create a new Mastercam file. Create a rectangle, then a 2D contour operation on that geometry. Turn on the coolant options in the dialog box. You should see the correct options on the coolant page...

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