Simulating Multiple Block Delete Functions
With block delete, a slash code (/) in the program works with an on/off switch on the control panel. If the switch is on, the control will ignore programming words to the right of slash codes.
With block delete, a slash code (/) in the program works with an on/off switch on the control panel. If the switch is on, the control will ignore programming words to the right of slash codes. If the switch is off, the control will execute programming words to the right of the slash code. Most controls allow you to use the slash code mid-command. Consider: N040 G43 H01 Z0.1 / M08
Here, only the M08 word will be affected by the position of the block delete switch.
The block delete function gives operators a choice between two possibilities. Should coolant come on or not? Is there excessive stock on a surface to be machined or not? There are many potential applications.
With most controls, you can use block delete for only one application per program. Unless your control has multiple block delete capabilities, you cannot, for example, use block delete to control trial machining for two tools in the program. But if your control has custom macro (or any version of parametric programming), you can simulate the multiple block delete function and extend your capabilities over block delete.
Instead of using an on/off switch on the control panel to dictate whether words or commands are executed, you can use a permanent common variable. The operator sets the variable to either 0 or 1. Think of 0 as off and 1 as on.
Values for permanent common variables can be entered in much the same way that offsets are entered. You can place a short note next to the variable to label it, which is important. Because two or more permanent common variables are used if you are simulating the multiple block delete function, you want to make clear to the operator what each variable controls. Instead of a slash code, an “IF statement” is used within the program to test the current value of the permanent common variable.
The following uses permanent common variable #500 to control if coolant will come on in the program or not. If #500 is set to zero (like having the block delete switch turned off), coolant will be activated. If #500 is set to one (like having the block delete switch turned on), coolant will not be activated.
The position of the block delete switch rarely makes sense to operators. When a switch is turned on, they’re used to something happening. But with block delete, when the switch is turned on, something doesn’t happen. You can remedy this with custom macro. It may make more sense to set up the test so that if #500 is set to one, coolant is activated. If #500 is set to zero, it is not activated. Consider these commands:
N060 G00 X1.0 Y1.0 (Rapid to first XY position)
N065 IF [#500 NE 1] GOTO 080 (If #500 is not a 1 [it must be a zero], go to line N080)
N070 G43 H01 Z0.1 M09 (coolant stays off)
N075 GOTO 085
N080 G43 H01 Z0.1 M08 (Coolant comes on)
N085 G01…
We’ve set up the test so that if #500 is zero, coolant comes on. In line N065, the if statement tests the current value of #500. If it is anything but 1 (it must be 0), the GOTO statement sends the control to line N080, and coolant is activated. IF #500 is set to 1, then the if statement in line N065 is evaluated as false, and the next command in the program is executed (coolant does not come on). The GOTO statement in line N075 has the control skip the line N080.
To label permanent common variables, a SETVN (set variable name) command is used. Once the variable is labeled, the label is active until you overwrite it with another SETVN command. With most controls, the label must be short (up to eight characters). Most controls only allow you to label permanent common variables from #500 through #509. Here’s an example that will label permanent common variable #500.
SETVN 500 [COOLANT?]
This command needs only be executed once. Once it’s executed, the control will place the label “COOLANT?” next to permanent common variable #500 on the permanent common variable page of the display screen. Although you can place this command right in the program, the label will not appear until the program is executed, which will not help the operator until after they run the program. It may be better to include your SETVN commands in a setup program.
Custom macros can be used to simulate several block delete functions. Permanent common variable #501 could be used to handle trial boring with a boring bar. #502 could be used to control trial machining with an end mill. #503 could be used to specify whether excess stock is on a cast surface.
Read Next
Encountering Surface Finishes in the Everyday World
Surface measurement is becoming increasingly important to ensure proper performance of a manufactured product. Advanced surface measurement tools are not only beneficial in the manufacturing industry but also have unconventional applications.
Read More3 Mistakes That Cause CNC Programs to Fail
Despite enhancements to manufacturing technology, there are still issues today that can cause programs to fail. These failures can cause lost time, scrapped parts, damaged machines and even injured operators.
Read MoreIncreasing Productivity with Digitalization and AI
Job shops are implementing automation and digitalization into workflows to eliminate set up time and increase repeatability in production.
Read More