New subprogram support in post processors

New subprogram support in post processors

bob.schultz
Alumni Alumni
5,214 Views
24 Replies
Message 1 of 25

New subprogram support in post processors

bob.schultz
Alumni
Alumni

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.

 

Subprograms.png


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 P1002O1002(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

5,215 Views
24 Replies
Replies (24)
Message 21 of 25

Anonymous
Not applicable

I was looking over the HAAS turning genetic post, I do not see that post with the updated subprogram support. I have a couple HAAS ST20's that use M98 P1 for the clearance variables. I would like to add the subprogram ability to avoid adding the subprogram every time I post a program. Is there a post already for the genetic HAAS turning post?

0 Likes
Message 22 of 25

elavake
Participant
Participant

Hello,

I would like my Haas code to be created with one sub routine that is called up for each location of that same feature like is explained below. I downloaded the Fanuc.cps post and ran code but the code still reflects all 5 of the same holes in the sub routine instead of one sub at 5 different location.  Not sure what I am doing wrong..

elavake_0-1603117737114.pngelavake_1-1603117801945.png

 

elavake_2-1603117901824.png

 

 

0 Likes
Message 23 of 25

bob.schultz
Alumni
Alumni

Subprograms only work with patterned operations, so you need to select only the first hole for the operation and place it in a Linear Pattern to get the post to output a subprogram and a call for each hole.



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 24 of 25

elavake
Participant
Participant
Good morning Bob,
I will look into that.

Thanks !
0 Likes
Message 25 of 25

Cameron.BondVHC2D
Community Visitor
Community Visitor

Interested in a subprogram support post for haas st20y lathe or haas turning in general. Is it also fanuc turning?

0 Likes