HCL CAMWorks
Published

Streamlining The Testing Of Offsets

In a previous column I gave some custom macro B techniques for testing offset values for correctness. But the previous column required that the cumbersome commands related to testing offset values be included within the main program.

Share

In a previous column I gave some custom macro B techniques for testing offset values for correctness. But the previous column required that the cumbersome commands related to testing offset values be included within the main program. Additionally, the method shown assumed that all offsets will to be tested in the same manner. Here's a method that allows more explicit offset testing and can be commanded from within the CNC program.

The technique involves the use of parametric programming, and we're showing the example in Fanuc's custom macro B. A G65 command is used to call the custom macro that does the offset testing. Here is an example of the calling command:

O0001 (main program)
/N005 G65 P1000 B1. E12. S3. H11. (Test offsets 1-12)
N010 T01 M06 

In line N005 the G65 calls program O1000 (the custom macro). The letter address B (for begin) specifies the first offset to be tested. Letter address E (for end) specifies the last offset to be tested. S (for small) specifies the smallest value the offset in the group can be. H (for huge) specifies the largest value that each offset can be. Since the offset checking commands will take some time to execute, the slash code is included so the operator can skip them by turning on the block delete switch once the production run is started.

For a given job, you'll want to test various offsets in different ways. Tool stations, for example, may not be consecutive. This method allows you to string together a series of offset testing commands that will test all related offsets in the desired manner. Here's another example:

O0001 (main program)
/N005 G65 P1000 B1. E12. S3. H11.
/N006 G65 P1000 B16. E22. S3. H10.
/N007 G65 P1000 B23. E23. S4. H4.5
/N008 G65 P1000 B26. E30. S3. H10.
/N009 G65 P1000 B36. E36. S.375 H0.75
N010 T01 M06
N015 G54 G90 S500 M03

Line N005 tests offsets 1-12. They must be between 3-11 inches. Line L006 tests offsets 16-22. They must be between 3-10 inches. Line N007 tests offset 23. It must be between 4-4.5 inches long. Line N008 tests offsets 26-30. They must be between 3-10 inches. Line N009 tests offset 36 (a cutter radius compensation offset). It must be between 0.375-0.75 inch.

Following is the custom macro program that actually performs the testing. It must, of course, reside in memory whenever offset testing is done.

O1000 (offset tester) # 10 l = #2 (counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (test if finished)
IF[#[2000 + #101 ] GE #19] GOTO 5 (OK so far)
#3000 = 100 (offset value too small)
N5 IF[#[2000 + #101 ] LE #11 ] GOTO 6 (tool OK)
#3000 = 101 (offset value too big)
N6 #101 = #101 +1 (step counter/offset number)
GOTO 1 (go back to the loop test)
N99 M99 

If any offset is outside the allowable range, an appropriate alarm will be sounded. But you may be wondering how the operator can determine which offset is inappropriately set. Note that common variable #101 acts as the counter and the current offset number being tested. If an alarm is sounded, the operator can see which offset is not correctly set by looking up the value of #101 on the common variable display screen page.

HCL CAMWorks
ProShop
QualiChem Metalworking Fluids
VERISURF
IMTS+
Paperless Parts
World Machine Tool Survey
DN Solutions
Techspex
MMS Made in the USA
TIMTOS
Koma Precision

Read Next

Software

IMTS 2024: Trends & Takeaways From the Modern Machine Shop Editorial Team

The Modern Machine Shop editorial team highlights their takeaways from IMTS 2024 in a video recap.

Read More
Sponsored

The Future of High Feed Milling in Modern Manufacturing

Achieve higher metal removal rates and enhanced predictability with ISCAR’s advanced high-feed milling tools — optimized for today’s competitive global market.

Read More
View From My Shop

Inside Machineosaurus: Unique Job Shop with Dinosaur-Named CNC Machines, Four-Day Workweek & High-Precision Machining

Take a tour of Machineosaurus, a Massachusetts machine shop where every CNC machine is named after a dinosaur! 

Read More
ProShop