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:

ProTip - Outputting an Operation with Block Delete Active


Colin Gilchrist
 Share

Recommended Posts

I recently helped a Forum Member with understanding how to activate and deactivate the Block Delete function, and it occurred to me that there are probably quite a few people that would like to use Block Delete, but don't know how to control the output settings. I thought I'd write up a Tech Tip on how to use the Block Delete function in your Operations.

 

What is Block Delete?

 

The Block Delete function is an option on most modern CNC Control Units. Using the 'Block Delete' switch on a line of NC code allows you to "optionally skip" any line of code that starts with the Block Delete character.

 

The Block Delete character on a Fanuc Control is the "forward slash" character (/). When a line of code begins with the Block Delete character, the control unit will check to see if the "Block Delete" option is active on the control. There is typically a "Block Delete" button (usually with an indicator light). When that option is turned on, the control will "skip" or pass over any line of code that begins with that character.

 

Many modern controls have multiple block delete options (typically indicated with /1, /2, /3, ..., /9), which allows you 9 different "skip" options.

 

Controlling Block Delete output

 

Mastercam has support for Block Delete output built into every Generic Mastercam Post Processor. (MPMaster also has support for Block Delete built into the post.) The "default" options only support a single Block Delete command (/), but can be modified to support multiple Block Delete options.

 

  • The "Block Delete" option is controlled through the Canned Text mechanism inside every Mastercam Operation.
  • You "enable" Block Delete by choosing the "Canned Text" node in the operation tree (or the "Canned Text" button, on older dialog boxes).
  • There are two command options to choose from "Block Delete On", and "Block Delete Off".
  • In addition to the On/Off commands, there are 3 different "modes" or "locations" where the options can be activated; "Before", "With", and "After". These roughly correspond to "before the tool change", "with the tool change", and "after the tool change".
  • You enable the Block Delete by choosing the "Block Delete On" command, and choosing "before, with or after" for the output.
  • When you turn Block Delete "on", it is a Modal function. This means it remains "on" until you turn it off.

So why would you want to use Block Delete at all?

 

Say for example that you are creating a program and you want to allow the programmer to have the ability to "restart" the control at a every Operation, while they are proving out the program. But when you run the program in "production" mode, you want to be able to skip over the Tool Change events. This is a good case of where you might want to use Block Delete.

 

For example, say you have 3 Contour Operations, and all 3 use the same tool. Normally you would only get a "Tool Change" at the first operation, and each subsequent operation would be a "Null Tool Change", where the tool number is the same. In this case, Mastercam would output the motion for the first tool, retract to the retract plane, and then just move in XYZ to the start of the next Op and keep machining.

 

  1. Contour 1 - Machine Left side of part
  2. Contour 2 - Machine Right side of part
  3. Contour 3 - Machine Front Step

In this example, we first enable "Force Tool Change" on Ops 2 and 3. This gives us something like this:

T1 M6
(OP 1)
G0 G90 G54 X-1.13 Y-4.3
G43 H1 Z.25 M8
Z-1. F20.
G1 X-1.03 F10.
Y3.
X-1.13
G0 Z.25 M9
G0 G91 G28 Z0.
(OP 2)
T1 M6
G0 G90 G54 X4.13 Y3.0
G43 H1 Z.25 M8
Z-1. F20.
G1 X4.03 F10.
Y-4.3
X4.13
G0 Z.25 M9
G0 G91 G28 Z0.
(OP 3)
T1 M6
G0 G90 G54 X2. Y-3.25
G43 H1 Z.25 M8
Z-.25 F20.
G1 Y-3. F10.
X-2.
Y-3.25
G0 Z.25 M9
G91 G28 Z0.

By using Block Delete, we can optionally skip all of the Tool Change code lines, and only execute them when we want to.

 

In Operations 2 and 3, we would do the following:

 

  • Block Delete On, Before > Add
  • Block Delete Off, After > Add
  • Use "Toolpath Editor" to add a Canned Text output on the last point of the toolpath. (Block Delete On, After > Add) This will turn on Block Delete for the "Retract" move to machine Z Home
  • Use "Toolpath Editor" to "Insert a Point" at the beginning of the Tool Path. This gives us the "XY" approach move, so that we are positioned correctly before we "plunge" to start the "next op"

This would cause "block delete" to be active "before and during" the tool change, but it would then be shut off "after" the tool change is complete. Your code would then look like this:

T1 M6
(OP 1)
G0 G90 G54 X-1.13 Y-4.3
G43 H1 Z.25 M8
Z-1. F20.
G1 X-1.03 F10.
Y3.
X-1.13
G0 Z.25 M9
/G0 G91 G28 Z0.
(OP 2)
/T1 M6
/G0 G90 G54 X4.13 Y3.0
/G43 H1 Z.25 M8
G0 X4.13 Y3.0
Z-1. F20.
G1 X4.03 F10.
Y-4.3
X4.13
G0 Z.25 M9
/G0 G91 G28 Z0.
(OP 3)
/T1 M6
/G0 G90 G54 X2. Y-3.25
/G43 H1 Z.25 M8
G0 X2. Y-3.25
Z-.25 F20.
G1 Y-3. F10.
X-2.
Y-3.25
G0 Z.25 M9
G91 G28 Z0.

If we run the program with "Block Delete" option enabled on the control, then all of the Retract and Tool Change codes get skipped, and all three operations run without a Retract or Tool Change taking place. But, if we want to re-run OP 2, or OP 3, we simply start a the line before the tool change, enable "Single Block", and skip the "T1 M6" line by pressing Cycle Start once, and then turn off the Block Delete function. This allows us to process the start up codes.

 

If a different tool was loaded in the spindle, we just start the program before the Tool Change line, and disable Block Delete, and let it rip.

 

 

 

 

 

 

  • Like 5
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...