cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Having the capability of turning a pattern into a subroutine

Having the capability of turning a pattern into a subroutine

It would be when you create a pattern to be able to put it into a subroutine with its own WCS. When you build fixtures offline it would be nice to be able to adjust the coordinates Kama otherwise you have to adjust your model to match your fixtures.

Also in the  WCS offest it would be nice to be able to put in, G154 Pxxx instead of the need to add XXX plus 6 = XXX

11 Comments
Steinwerks
Mentor

"Also in the WCS offest it would be nice to be able to put in, G154 Pxxx"

 

With regards to this, it isn't really feasible. There are plenty of machines that don't use that sort of offset numbering. I have seen requests for a default output of G154 P(WCS) though and that's not too difficult a post mod.

cj.abraham
Alumni

We have a post that will output operations as subprograms. Below is sample code from said post. Is this close to what you are looking for?

 

%
O01234 (Test)
(DATE LAST RUN: 0/00/05)
(XY 0 ?)
(Z 0 ?)
(RUNNING ? PARTS)
(T1 D=0.375 CR=0. - ZMIN=0. - flat end mill)
(T2 D=0.25 CR=0. TAPER=118deg - ZMIN=0. - drill)
M31

 

T1 M06
G0 G90 G54 X1.5 Y-1.1875 M03 S8000
G43 Z1.1 H1 T2
M08
G54 X1.5 Y-1.1875 P1 M97
G55 X1.5 Y-1.1875 P1 M97
M05
M09
M01

 

T2 M06
G0 G90 G54 X1.5 Y-1. M03 S4580
G43 Z1.1 H2 T1
M08
G54 X1.5 Y-1. P2 M97
G55 X1.5 Y-1. P2 M97

 

M33
M05
M09
G28 G91 Z0.
G90
G53 X-15. Y0.
M30

 

(SUBS TO FOLLOW)

 

N1
(2D Contour1)
G1 X1.5 Y-1.1875 Z1.1 F500.
G0 Z0.0394
G1 Z0. F50.
X-1.5
G17 G2 X-1.6875 Y-1. I0. J0.1875
G1 Y1.
G2 X-1.5 Y1.1875 I0.1875 J0.
G1 X1.5
G2 X1.6875 Y1. I0. J-0.1875
G1 Y-1.
G2 X1.5 Y-1.1875 I-0.1875 J0.
G0 Z1.1
G28 G91 Z0.
G90
M99

 

N2
(Drill1)
G1 X1.5 Y-1. Z1.1 F500.
G17
G0 Z0.7
G98 G81 X1.5 Y-1. Z0. R0.7 F23.
G80
G0 Z1.1
G28 G91 Z0.
G90
M99
%

Steinwerks
Mentor

@cj.abraham

 

To be fair the subroutines don't work like they need to. If you only have two parts on your table (don't know about more, we never run more than two), instead of ordering so that the spindle starts and putting all locations in a sub run after the WCS is called, it creates subroutines for each toolpath instead of one sub for all WCS'. I never even bother trying them anymore.

cj.abraham
Alumni

@Steinwerks This was just a sample of how we can post using sub routines. We can modify the post so that the order is one sub for each WCS as you suggest.

Steinwerks
Mentor

@cj.abraham

 

Mind sending me that one? Because this is what I get (and yes, modified post built on the second to newest Haas milling post, I can send it to you if you want to see it):

 

O10000 (PART)
(T1 - 3/8 3FL End Mill - ZMIN=-0.6229)
(T2 - 1/4 Router Bit - ZMIN=-0.3979)
(T3 - 1/8 2 Flute Plastics - ZMIN=-0.5429)
(T4 - 1/4 2FL Ball Mill Plastics - ZMIN=-0.5284)
(T6 - 1/16x4" Slitting Saw - ZMIN=-0.5854)
G90 G94 G17
G20
G53 G0 Z0.

(Face)
T1 M6
T2
S10000 M3
#100=120. (Cutting)
#102=120. (Finish)
#103=120. (Entry)
#104=120. (Exit)
G54
G187 P3
G0 X1.2437 Y-0.4958
M8
G43 Z1. H1
M98 P80107 (Face)

(Rough Body)
#100=120. (Cutting)
#103=120. (Entry)
#104=120. (Exit)
#105=833. (Direct)
G187 P2
G0 X1.4281 Y-0.6635
M98 P80108 (Rough Body)

(Finish Profile)
#102=75. (Finish)
#103=75. (Entry)
#104=75. (Exit)
#108=120. (Plunge)
G187 P3
G0 Z1.
X-1.0762 Y0.617
M98 P80109 (Finish Profile)
G53 G0 Z0.

(Face)
#100=120. (Cutting)
#102=120. (Finish)
#103=120. (Entry)
#104=120. (Exit)
G55
G187 P3
G0 X1.2437 Y-0.4958
G43 Z1. H1
M98 P80110 (Face)

(Rough Body)
#100=120. (Cutting)
#103=120. (Entry)
#104=120. (Exit)
#105=833. (Direct)
G187 P2
G0 X1.4281 Y-0.6635
M98 P80111 (Rough Body)

(Finish Profile)
#102=75. (Finish)
#103=75. (Entry)
#104=75. (Exit)
#108=120. (Plunge)
G187 P3
G0 Z1.
X-1.0762 Y0.617
M98 P80112 (Finish Profile)
M5
G53 G0 Z0.

(Counterslots)
M9
M1
T2 M6
T3
S10000 M3
#102=60. (Finish)
#103=60. (Entry)
#104=60. (Exit)
#107=60. (Ramping)
G54
G187 P3
G0 X-0.6512 Y0.0827
M51
G43 Z1. H2
M98 P80113 (Counterslots)
G53 G0 Z0.

(Counterslots)
G55
G187 P3
G0 X-0.6512 Y0.0827
G43 Z1. H2
M98 P80114 (Counterslots)
M5
G53 G0 Z0.

(Through Slots)
M61
M1
T3 M6
T4
S10000 M3
#102=30. (Finish)
#103=30. (Entry)
#104=30. (Exit)
#107=30. (Ramping)
#108=30. (Plunge)
G54
G187 P3
G0 X0.7163 Y0.0827
M51
G43 Z1. H3
M98 P80115 (Through Slots)
G53 G0 Z0.

(Through Slots)
G55
G187 P3
G0 X0.7163 Y0.0827
G43 Z1. H3
M98 P80116 (Through Slots)
M5
G53 G0 Z0.

(Finish Body)
M61
M1
T4 M6
T6
S12000 M3
#100=72. (Cutting)
#103=72. (Entry)
#104=72. (Exit)
G54
G187 P3
G0 X1.0681 Y-0.1094
M51
G43 Z1. H4
M98 P80117 (Finish Body)
G53 G0 Z0.

(Finish Body)
G55
G187 P3
G17
G0 X1.0681 Y-0.1094
G43 Z1. H4
M98 P80118 (Finish Body)
M5
G53 G0 Z0.

(Cutoff)
M61
M1
T6 M6
T1
S380 M3
#102=15. (Finish)
#103=15. (Entry)
#104=15. (Exit)
#108=50. (Plunge)
G54
G187 P2
G17
G0 X2.3027 Y-1.8976
M8
G43 Z1. H6
M98 P80119 (Cutoff)
G53 G0 Z0.

(Cutoff)
G55
G187 P2
G0 X2.3027 Y-1.8976
G43 Z1. H6
M98 P80120 (Cutoff)

M5
M9
G53 G0 Z0.
X0.
G53 Y0.
M30

I already get one subprogram for every WCS, and I don't want that. I want one sub for ALL WCS'.

 

Maybe this belongs in its own thread.

cj.abraham
Alumni

If you wanted one sub for all WCS, wouldn't you just post the program for one part, remove the offset callouts, then make a new short program that calls out the posted program for each offset you want?

 

This is very much getting off topic from the Idea title.

Anonymous
Not applicable
Subroutines are easy doing a subroutine for a pattern is different, for instance if you're running a back-to-back vises they are a 180 degrees opposite of each other.
Greg_Haisley
Collaborator

The proper way to achieve this is in the UI. So all different scenarios can be addressed. The settings in the UI would be passed to the post.

This is the way other CAM packages have solved this issue. See Gibbs CAM, Delcam and other high end CAM systems.

 

I believe the use of sub-programming in the HSMworks was not thought of from the conception of the product. The whole crux was to get the adaptive HSM strategy out there IMHO.

 

Constantly customizing posts is not the intuitive way of getting this done IMHO.

AchimN
Community Manager
Status changed to: Accepted

We will look into this.

bob.schultz
Alumni

We have modified the standard subprogram logic in the Haas UMC-750 post (initial post for testing this feature).  If anyone would like a copy of this post to see if it matches what you are looking for in subprogram support, then please PM me with your e-mail and I'll send you a copy.  Even if you don't have a Haas UMC-750 the logic is pretty much the same as it would be in other posts, so you can visually check the output and see if it is along the guidelines of this request.

The logic used will create a subprogram for the first operation in the pattern and then perform the tool-change/WCS-change and then call the subprogram for the rest of the operations in the pattern.  The operation in the pattern is output in incremental mode.  It supports translated patterns and patterns that change the working plane as long as the resultant output is a simple translation from the first pattern object.

bob.schultz
Alumni
Status changed to: Implemented

Subprogram support for translated patterns and multi-hole cycles has been added to the latest version of the generic fanuc.cps post processor.  You can visit the Post Processor Forum thread to see how it has been implemented.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea