91ÊÓÆµÍøÕ¾ÎÛ

Published

SPC Reporting in Manual Post-Process Gaging

In a turning center, a manual post-process gaging system can include statistical process control (SPC) reporting.

Share

Leaders-In background
A custom macro B can eliminate the need for a CNC operator to calculate adjustments prior to making a sizing adjustment. However, the operator still has to know when the adjustment is necessary. There is another custom macro that can determine when an adjustment is required and make that adjustment based on a user’s critical dimension criteria.
 
To use this custom macro, the operator must measure the critical surface(s) and enter the values into corresponding permanent common variables. Like any offset adjustment, this can be done while the machine is in cycle. With larger lot sizes, sizing adjustments must be made many times during the production run—that’s why this system is helpful. Most workpieces have a few critical dimensions that must be monitored and adjusted in this fashion. The examples at short.mmsonline.com/techtalk show four of them.
 
How it works: The sizing adjustment commands will not help during setup, so the setup person can skip them when running the first workpiece (starting with line N1000 in the main program). Once the first workpiece is sized in, the setup person enters the current values of the critical dimensions in the related permanent common variables (instructions for doing so are at the beginning of the main program). As many as nine permanent common variables can be labeled with the SETVN command, so operators will know where to enter each measured value. 
 
Finally, the operator should specify when each sizing adjustment should be performed with two commands per critical dimension: a G65 call statement to the macro and the actual sizing adjustment command.
 
Here are the meanings of each argument in the G65 command:
• M: the #500 series variable number in which the operator enters the measured value.
 
• T: the target value for the dimension. This value is targeted when adjustments are made.
 
• B: the high (big) limit for entry. B and S are intended to catch entry mistakes. If the operator enters a value that is larger than the B value, an alarm will sound.
 
• S: the low (small) limit for the measured value before an alarm sounds. Note: an operator can also use B and S to specify actual tolerance limits so the system catches scrap parts. Have the operator set B and S to high and low limits for the tolerance band. 
 
• H: the high limit for not making an adjustment. If the measured value is larger than the H limit, an adjustment will be made. This value can be set within 20 percent of the tolerance limit. As a dimension grows or shrinks past this limit, a sizing adjustment will be made automatically.
 
• C: the low limit for not making an adjustment.
 
The result is returned to the main program in common variable #112. If an adjustment is not necessary, meaning the measured value is between C and H, the value of #112 will be zero. If the measured value is below C or above H, an adjustment must be made. Therefore, #112 will be set to the amount and polarity of the adjustment. Also, the permanent common variable will be set back to its target value. The command following each G65 command uses a #2000 series system variable (access to wear offsets) to actually make the adjustment in the appropriate direction (X or Z, plus or minus) and for the appropriate tool.
 
The operator measures these critical workpiece attributes during the production run just as he or she normally does. However, instead of deciding whether measured values are within the tolerance band or whether they are growing or shrinking (due to tool wear) close to a tolerance limit, the operator simply enters the measured value into the related permanent common variable. The custom macro does all the decision-making and, when necessary, makes sizing adjustments.
 
Do you want statistical process control reporting too? Though the example custom macro provided at short.mmsonline.com/techtalk doesn’t show it, you can easily include workpiece counting and a DPRNT command to output the measured values for each workpiece (DPRNT outputs data through the serial communications port). For counting, a #500 series variable can be placed in the main program before the last sizing adjustment command (like #511 = #511 +1). The DPRNT command can be placed in the custom macro after line N20 (before M99). For example, consider this command:
 
DPRNT [PART*NUMBER* #511[50]**#500[24]*DIMENSION:*#[#13][24]]
 
For each workpiece in the example, this command will output data that looks something like this:
 
PART NUMBER 00001  2.0000 DIMENSION: 2.0003

PART NUMBER 00001  2.1250 DIMENSION: 2.1248

PART NUMBER 00001  1.2500 DIMENSION: 2.2497

PART NUMBER 00001  1.8750 DIMENSION: 2.8751
 
Here are the programs:
O0001 (MAIN PROGRAM)

 

(INSTRUCTIONS:)

(ENTER MEASURED VALUE FOR 2.0 EXTERNAL DIAMETER IN #500)

(ENTER MEASURED VALUE FOR 2.125 FACE IN #501)

(ENTER MEASURED VALUE FOR 1.25 INTERNAL DIAMETER IN #502)

(ENTER MEASURED VALUE FOR 1.875 GROOVE BOTTOM DIAMETER IN #503)

 

(IF YOU WANT #500 SERIES VARIABLES LABELED:)

SETVN 500 (2.0 DIA)

SETVN 501 (2.125 FC)

SETVN 502 (1.25 DIA)

SETVN 503 (1.375 GR)

 

(TOOL NUMBER THREE IS A FINISH TURNING AND FACING TOOL)

N5 G65 P1000 M500.0 T2.0 B2.004 S1.996 H2.0005 C1.9995 (CALL MACRO)

#2003 = #2003 + #112 (ADJUST X REGISTER OF WEAR OFFSET NUMBER 3)

 

N10 G65 P1000 M501.0 T2.125 B2.129 S2.121 H2.1255 C2.1245 (CALL MACRO)

#2103 = #2103 + #112 (ADJUST Z REGISTER OF WEAR OFFSET NUMBER 3)

 

(TOOL NUMBER FOUR IS A FINISH BORING BAR)

N15 G65 P1000 M502.0 T1.25 B1.259 S1.246 H1.2505 C1.2495 (CALL MACRO)

#2004 = #2004 + #112 (ADJUST X REGISTER OF WEAR OFFSET NUMBER 4)

 

(TOOL NUMBER EIGHT IS A EXTERNAL GROOVING TOOL)

N20 G65 P1000 M503.0 T1.375 B1.379 S1.371 H1.3755 C1.3745 (CALL MACRO)

#2008 = #2008 + #112 (ADJUST X REGISTER OF WEAR OFFSET NUMBER 8)

 

N1000

(MACHINING COMMANDS FOR WORKPIECE START HERE)

(.)

(.)

(.)

M30 (END OF MAIN PROGRAM)

 

O1000 (SIZING ADJUSTMENT CUSTOM MACRO)

#112=0

IF [#[#13] LE #2] GOTO 5

#3000 = 100 (ENTERED VALUE TOO BIG)

N5 IF[#[#13] GE #19] GOTO 10

#3000 = 101 (ENTERED VALUE TOO SMALL)

N10 IF [#[#13] GE #3] GOTO 15

#112 = #20 - #[#13]

#[#13] = #20 (RESET MEASURED VALUE TO TARGET VALUE)

N15 IF[#[#13] LE #11] GOTO 20

#112 = #20 - #[#13]

#[#13] = #20 (RESET MEASURED VALUE TO TARGET VALUE)

N20 M99 
MMS Leaders in CNC Machining

Related Content

CNC Tech Talks

6 Variations That Kill Productivity

The act of qualifying CNC programs is largely related to eliminating variations, which can be a daunting task when you consider how many things can change from one time a job is run to the next.

Read More
CNC Tech Talks

Computer Programming-Related Features of Custom Macro

Custom macro is an interpreter-based language, meaning that all CNC G code and custom macro commands are executed as the CNC comes across them.

Read More

CNC-Related Features of Custom Macro

CNC-related features of custom macro are separated into two topics: system variables and user-defined G and M codes. This column explores both.

Read More

Tips for Designing CNC Programs That Help Operators

The way a G-code program is formatted directly affects the productivity of the CNC people who use them. Design CNC programs that make CNC setup people and operators’ jobs easier.

Read More

Read Next

Automation

AMRs Are Moving Into Manufacturing: 4 Considerations for Implementation

AMRs can provide a flexible, easy-to-use automation platform so long as manufacturers choose a suitable task and prepare their facilities.

Read More
Basics

Machine Shop MBA

  Making Chips and 91ÊÓÆµÍøÕ¾ÎÛ are teaming up for a new podcast series called Machine Shop MBA—designed to help manufacturers measure their success against the industry’s best. Through the lens of the Top Shops benchmarking program, the series explores the KPIs that set high-performing shops apart, from machine utilization and first-pass yield to employee engagement and revenue per employee.  

Read More
Economics

Last Chance! 2025 Top Shops Benchmarking Survey Still Open Through April 30

Don’t miss out! 91ÊÓÆµÍøÕ¾ÎÛ's Top Shops Benchmarking Survey is still open — but not for long. This is your last chance to a receive free, customized benchmarking report that includes actionable feedback across several shopfloor and business metrics. 

Read More