New subprogram support in post processors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
A number of requests have been received to output patterned operations as a single subprogram and then to have the main program call it for each pattern instance. We have implemented new properties to the generic Fanuc post processor that will allow you to do just this. There are now three properties used for the controlling of subprogram output.
useSubroutines: yes
Setting this property to yes will generate a separate subprogram for each operation. This will work in the same manner as subprograms do in existing post processors.
useSubroutinePatterns: yes
This property controls the output of subprograms during patterned operations. Translated pattern operations will create a single subprogram for the first instance of the pattern and all instances of the pattern will issue a call to the same subprogram to perform the operation. All start of operation codes and the initial position will be output prior to calling the subprogram. The subprogram will be output in incremental mode so that the moves are correct for each pattern instance. 3+2 operations that generate the same motion on separate faces of a part will also be output as a single subprogram.
(2D-FACE) N30 T1 M06 (TOOL COMMENT) N35 T2 N40 S5000 M03 N45 G54 N50 M08 N60 G00 X3.6811 Y-1.3961 N65 G43 Z0.6299 H01 N70 M98 P1002 N80 G00 X3.6811 Y2.6039 N85 G43 Z0.6299 H01 N90 M98 P1002 N105 G00 X3.6811 Y6.6039 N110 G43 Z0.6299 H01 N115 M98 P1002 … O1002(2D-FACE) G91 G00 Z-0.3937 G01 Z-0.2362 F39.4 X-7.3622 G02 Y0.8422 J0.4211 G01 X7.3622 G03 Y0.8421 J0.4211 G01 X-7.3622 G00 Z0.6299 G90 M99
useSubroutineCycles: yes
Enabling the useSubroutineCycles property will a create subprogram for cycle hole locations that are used in multiple cycle operations, for example center drilling, drilling, and tapping. All start of operation codes and the initial cycle definition, including the first hole location, will be output prior to calling the subprogram. The subprogram itself will contain the remaining hole locations in the cycle. The minimumCyclePoints variable is defined at the top of the post processor, which defines the minimum number of points in the cycle to consider for placing into a subprogram. Each cycle operation will have to contain the same number of points and the order of the hole locations must be the same in all operations.
(DRILL) N30 T1 M06 N35 T3 N40 S5000 M03 N45 G54 N50 M08 N60 G00 X12.7 Y50.8 N65 G43 Z15. H01 N75 G00 Z5. N80 G98 G81 X12.7 Y50.8 Z-3. R4. F333. N85 M98 P1002 N90 G80 N95 X-101.6 Y-38.1 Z15. (TAP) N100 M09 N105 M01 N110 T3 M06 N115 T1 N120 S7519 M03 N125 G54 N130 M08 N135 G00 X12.7 Y50.8 N140 G43 Z15. H03 N245 G00 Z5. N250 M29 S7519 N255 G84 X12.7 Y50.8 Z-28.4 R4. P0 F9549. N260 M98 P1002 N265 G80 N270 X-101.6 Y-38.1 Z15. … O1002(DRILL) X38.1 Y12.7 X76.2 Y38.1 X25.4 Y-38.1 X-25.4 Y-12.7 X-63.5 Y25.4 X-114.3 Y50.8 X-101.6 Y-38.1 M99
If you are in need of this style of subprogram support, please feel free to download the fanuc.cps post processor with the new subprogram support from the standard Autodesk Post Library. Great care should be taken when running the output from this post on your machine, as always with any new feature or post processor. Once this post has been substantially verified we will be implementing subprogram support into some of the other generic posts.

Bob Schultz
Sr. Post Processor Developer