top of page
Search

# Single-Stepping Through Calculation And Logic Commands

The function of Single Block, of course, is to allow a setup person or operator to step through a program command-by-command. If the Single Block switch is on, an operator can rest assured that the machine will come to a stop at the end of the current command. To get the machine going again, they must press the Cycle Start button. And if the Single Block switch is left on, they must press the Cycle Start button repeatedly to get through the program.

With certain custom macro B commands, however, the Single Block switch may not always perform as desired. It is important to know that, when Single Block is on, the machine will appear to skip calculation and logic commands. Consider this example:

• .

• .

• N015 G00 X5.0 Y2.0

• #101 = 1

• #102 = FUP[#26 / #17]

• N020 G01 Z-0.1 F4.0

• .

• .

Say the Single Block switch is on. The machine stops at the completion of N015. When the Cycle Start button is pressed, line N020 will be executed and the machine will move. Again, it will be as if the three calculation commands have been ignored. But they have not been ignored. #101 through #103 will be correctly assigned.

Having Single Block behave in this fashion is usually a good thing. You wouldn't want an operator pressing the Cycle Start button over and over again. It may take twenty or thirty pressings of Cycle Start in some custom macros to get through all the calculation and logic commands. This would be very distracting for the operator.

There is one time when you may want to change the function of Single Block so that the machine will stop after (even) calculation and logic commands - when you are verifying a custom macro.

Consider these commands:

There is a mistake in the #103 = command. It must be corrected. But when (in normal fashion) the machine "skips" from N015 to N020, an alarm will be sounded. Since the operator knows line N015 is the last motion command, it's likely that they will think the alarm is being generated with the next command (the #101 command).

Just knowing that any of the calculation and logic commands between N015 and N020 could be causing the alarm may be enough to help diagnose the problem. But it's nice to know that a parameter can be modified to change the function of Single Block - causing the machine to stop after every command - including calculation and logic commands.

Another time this can be helpful is when you have a series of progressive calculation commands and one calculation is depending upon another. It can be difficult to determine which of several commands is causing a miscalculation - unless you can see the resulting variable value after each calculation command is executed (this can be done by toggling between the program page and the variables page of the display screen).

On a 16 series Fanuc control, bit number five of parameter number 6000 controls this function (it is labeled as SBM in the Fanuc documentation). If this bit (the sixth one from the right) is set to 1 (one), the machine will stop at each calculation and logic command. If set to 0 (zero) - which is the normal setting - the machine will only stop at true CNC commands. Remember, of course, that parameter numbering changes from one Fanuc model to the next, meaning you'll have to look up the related parameter on your control (look in the custom macro descriptions - it should be easy to find).

Do note that if you change this parameter while verifying a custom macro, you must remember to change it back when your finished so as not to cause problems for the operator.