Using Debug Mode

 

 

Parent    Previous    Next

 

Debug mode allows you to easily track down and locate what Post Blocks are controlling specific output in the NC file. Each Post Block that outputs code is noted into the code itself to easily identify which block to modify.

 

Debug mode is turned on by locating Post Block 26. and setting the command variable to “debug_on”. Use the variable “debug_off” to turn debug mode off.

 

For Post Blocks that internally call another Post Block you will notice the debug comment will have 2 numbers in the name. The 1st number is the initial Post Block that was called and the  2nd number is the final Post Block that was called. This makes it easy to locate output when nested Post Blocks are being called.

 

Examples:

 

Example 1 - NC Code Posted Normally (Debug turned OFF)

 

%

( JOBSETUP[Post Guide - Lesson 1.mwjs]JOBSETUP)

O0100 ( PROGRAM NUMBER)

(PROGRAM NAME - POST GUIDE - LESSON 1.NC)

(POST -  BC_3X_MILL 3-AXIS GENERIC FANUC)

(DATE - MON. 08/10/2020)

(TIME - 09:28AM)

(FIRST MACHINE SETUP - MACHINE SETUP - 1)

N01 G00 G17 G40 G49 G54 G80 G20 G90

(FIRST CUT - FIRST TOOL)

(MACHINE SETUP - 1-MILL CENTER BORE-PROFILE ROUGH)

(MILL CENTER BORE)

(TOOL #1 0.25 1/4 FLAT ENDMILL - STANDARD)

N02 T1 M06

N03 G54

N04 G90 X1.7823 Y-1.25 S1191 M03

N05 G43 H1 D1 Z1. M08

N06 Z0.2

N07 Z0.1

N08 G01 Z-0.375 F6.6738

N09 G41 D1 X1.9149 Y-1.3826 F13.3476

N10 G03 X2.235 Y-1.25 I0.1326 J0.1326

N11 X1.265 I-0.485 J0.

N12 X2.235 I0.485 J0.

N13 X1.9149 Y-1.1174 I-0.1875 J0.

N14 G40 G01 X1.7823 Y-1.25 F13.3476

N15 G00 Z0.2

N16 Z1.

N17 M09

N18 M05

N19 M01

N20 M05

N21 G90

.

.

.

 

Example 2 - Code Posted with Debug Turned ON

 

*************0. File header*************

%

( JOBSETUP[Post Guide - Lesson 1.mwjs]JOBSETUP)

O0100 ( PROGRAM NUMBER)

(PROGRAM NAME - POST GUIDE - LESSON 1.NC)

(POST -  BC_3X_MILL 3-AXIS GENERIC FANUC)

(DATE - MON. 08/10/2020)

(TIME - 09:31AM)

*************15. First Machine Setup*************

(FIRST MACHINE SETUP - MACHINE SETUP - 1)

*************2. Start of file standard*************

N01 G00 G17 G40 G49 G54 G80 G20 G90

(FIRST CUT - FIRST TOOL)

(MACHINE SETUP - 1-MILL CENTER BORE-PROFILE ROUGH)

(MILL CENTER BORE)

(TOOL #1 0.25 1/4 FLAT ENDMILL - STANDARD)

N02 T1 M06

N03 G54

N04 G90 X1.7823 Y-1.25 S1191 M03

*************2 - 14. Tool length compensation*************

N05 G43 H1 D1 Z1. M08

*************40. Start of operation*************

*************27. First Rapid Move Z*************

N06 Z0.2

*************50. Line rapid move Z - Z retract*************

N07 Z0.1

*************51. Line feed move Z*************

N08 G01 Z-0.375 F6.6738

*************56. Line feed move XY on lead-in*************

*************56 - 12. Cutter compensation left*************

N09 G41 D1 X1.9149 Y-1.3826 F13.3476

*************64. Arc move XY*************

N10 G03 X2.235 Y-1.25 I0.1326 J0.1326

*************64. Arc move XY*************

N11 X1.265 I-0.485 J0.

*************64. Arc move XY*************

N12 X2.235 I0.485 J0.

*************64. Arc move XY*************

N13 X1.9149 Y-1.1174 I-0.1875 J0.

*************57. Line feed move XY on lead-out*************

*************57 - 11. Cancel cutter compensation*************

N14 G40 G01 X1.7823 Y-1.25 F13.3476

*************50. Line rapid move Z - Z retract*************

N15 G00 Z0.2

*************71. End of operation*************

*************50. Line rapid move Z - Z retract*************

N16 Z1.

*************32. End code for operation not on transform plane*************

*************197. End of operation - Toolchange*************

N17 M09

N18 M05

N19 M01

*************3. Tool change*************

N20 M05

N21 G90

 

Looking at Example 2 above, we can see  the added lines that show what postblock is generating the code following it.

 

*************2. Start of file standard*************

N01 G00 G17 G40 G49 G54 G80 G20 G90

(FIRST CUT - FIRST TOOL)

(MACHINE SETUP - 1-MILL CENTER BORE-PROFILE ROUGH)

(MILL CENTER BORE)

(TOOL #1 0.25 1/4 FLAT ENDMILL - STANDARD)

N02 T1 M06

N03 G54

N04 G90 X1.7823 Y-1.25 S1191 M03

 

The debug line "*************2. Start of file standard*************" is telling us that all the NC code following that line is being generated from Post Block 2.

Nested Postblocks in Debug Mode

Post blocks that are called from within another postblock by using a command variable are referred to as being nested. You can identify this in the debug line as two postblock numbers separated by a "-" character. It is possible to have postblocks that are nested multiple times. In this scenario the system will only show the 1st postblock and last postblock in the debug comment.

 

Example of a nested postblock shown in the debug comment:

 

*************56 - 12. Cutter compensation left*************

N09 G41 D1 X1.9149 Y-1.3826 F13.3476

 

In the line above the debug comment is telling us that Block 56 is the 1st postblock called. Lets now look at this postblock.

 

56. Line feed move XY on lead-in

     n,cc,feed_move,x_f,y_f,feed_rate

 

On the postline we have the "cc" variable. this is a command variable that is telling the post system to call the appropriate cutter compensation block. In the case of this program that is block 12 for cutter compensation left. This is why we have the "56 - 12" in the debug line. To let us know that output is from both block 56 and block 12.