Post subroutines does not work, Just repeats the same code instead of making sub

Post subroutines does not work, Just repeats the same code instead of making sub

tjtalma
Advocate Advocate
635 Views
1 Reply
Message 1 of 2

Post subroutines does not work, Just repeats the same code instead of making sub

tjtalma
Advocate
Advocate

Using Mach 3 post process and selecting 'Yes' For subroutines generates the same code as selecting 'no', but just sticks it in a subroutine. It should put the same repeated process, in the subroutine.

 

I would like to tell my machine to go to a position and carve my logo in the part. I will tell it what position to go to. But instead it always goes to the same place on my machine. I want to be able to put a complex routine in a routine and have it use relative positions (G91). But there is no way to do this in Fusion without adding the logo to my model. 

 

With Mach i can put the subroutine in a folder. For example I can name the routine O9000. and put it in the subroutine folder. Then all I would need to add to my Gcode file is:

G90

G00 X35 Y22 Z1

PO9000

 

But instead I need to spend 1/2 hour or more adding the model to the part.

 

Example I have a part with 3 holes that are identical in it. I would expect the code look like:

...

G00 X1 Y1

M98 P0001

G00 X10 Y2

M98 P0001

G00 X12 Y2

M98 P0001

...

O0001

X-0.375 Z-0.165 I-0.375 J0.

...

X0.375 Z-3.04 I0.375 J0.

M99

...

 

But it doesn't it looks like:

M98 P0001

O0001

G00 X1 Y1

X-0.375 Z-0.165 I-0.375 J0.

...

X0.375 Z-3.04 I0.375 J0.

G00 X10 Y2

X-0.375 Z-0.165 I-0.375 J0.

...

X0.375 Z-3.04 I0.375 J0.

G00 X12 Y2

X-0.375 Z-0.165 I-0.375 J0.

...

X0.375 Z-3.04 I0.375 J0.

M99

0 Likes
636 Views
1 Reply
Reply (1)
Message 2 of 2

bob.schultz
Alumni
Alumni

The Mach3 post processor does support subprograms for a repeated operation.  You need to enable the 'Use subroutine patterns' option when running the post.subprogram.png

 

And you need to make sure that your operation is patterned by creating a pattern folder and placing your operation in it.pattern.png

 

You should get a single subprogram in incremental mode for the operation and calls to the subprogram for the instances of the operation.

 



Bob Schultz
Sr. Post Processor Developer

0 Likes