What's new
What's new

PS0329 The Finishing Shape is not a Monotonous Change

dksoba

Hot Rolled
Joined
Apr 8, 2011
Location
San Diego
Recently acquired a Takisawa TC-203j, with a Fanuc control (not really sure which one, I think it's a Fanuc OiT, but correct me if I'm wrong.). I'm writing my programs by hand, and having a lot of fun with it. Anyhow, I'm getting the following error, which from my understanding, means that I cannot have undercuts (I can't go z-negative, and then reverse direction and go Z-positive). I don't see where in my code I change directions in the Z or the X axis, except right in the beginning. Also, if I disable tool nose radius compensation (by changing G42 to G40), the program runs without errors. The relevant code that I think is relevant is below (and the full version is here: http://pastebin.com/Ufz2ajYV):

Code:
(OD Turning)
M0
M22
G40 G28 U0 W0
T0707 M16
G96 S1000
G0 X3.0 Z3.0 M3

G42 Z1.419 X2.8 /M8
G71 U0.04 R0.05
G71 P1 Q2 U0.005 W0.003 F0.020
N1 G0 X1.72
G1 Z1.319
X1.92 Z1.219
(G2 X1.9200 Z1.2190 R0.1)
G3 X2.0000 Z1.1790 R0.04
G1 	   Z0.5253
G2 X2.2600 Z0.3402 R0.1969
G1 X2.4942 Z0.2855
G3 X2.5000 Z0.2810 R0.005
G1 	   Z0.1000
N2 X2.5500
G70 P1 Q2 F0.004

G0 Z3.0 X3.0

So as I single step through this program, I get the PS0329 error message after it enters the G71 cycle. Also in the geometry offsets, the tool nose radius is set to 0.0315", and the tool type is set to "3". The values in the wear registers are all zeroed out. I drew out the program in SolidWorks and it looks exactly like it should. I'm a bit stuck, please advise!


Thanks,
Matt
 
Recently acquired a Takisawa TC-203j, with a Fanuc control (not really sure which one, I think it's a Fanuc OiT, but correct me if I'm wrong.). I'm writing my programs by hand, and having a lot of fun with it. Anyhow, I'm getting the following error, which from my understanding, means that I cannot have undercuts (I can't go z-negative, and then reverse direction and go Z-positive). I don't see where in my code I change directions in the Z or the X axis, except right in the beginning. Also, if I disable tool nose radius compensation (by changing G42 to G40), the program runs without errors. The relevant code that I think is relevant is below (and the full version is here: http://pastebin.com/Ufz2ajYV):

Code:
(OD Turning)
M0
M22
G40 G28 U0 W0
T0707 M16
G96 S1000
G0 X3.0 Z3.0 M3

G42 Z1.419 X2.8 /M8
G71 U0.04 R0.05
G71 P1 Q2 U0.005 W0.003 F0.020
N1 G0 X1.72
G1 Z1.319
X1.92 Z1.219
(G2 X1.9200 Z1.2190 R0.1)
G3 X2.0000 Z1.1790 R0.04
G1 	   Z0.5253
G2 X2.2600 Z0.3402 R0.1969
G1 X2.4942 Z0.2855
G3 X2.5000 Z0.2810 R0.005
G1 	   Z0.1000
N2 X2.5500
G70 P1 Q2 F0.004

G0 Z3.0 X3.0

So as I single step through this program, I get the PS0329 error message after it enters the G71 cycle. Also in the geometry offsets, the tool nose radius is set to 0.0315", and the tool type is set to "3". The values in the wear registers are all zeroed out. I drew out the program in SolidWorks and it looks exactly like it should. I'm a bit stuck, please advise!

PS. Having read through your entire code, I'd say that the

Thanks,
Matt

Hi Matt,
The Fanuc G71 Multi-repetative Roughing Cycle comes in two forms, Type I and Type II. If its an Oi control, its likely to have both. It is an option, but most late model controls have both.

The way the two different versions are invoked is via the "P" referenced block in the profile description. In your example P1 is referencing N1 in the profile description. To use Type I, that can't tolerate non monotonous moves, only a single axis is specified; X1.72 in your case. Accordingly, if you have a non-monotonous X move in the profile description, an error condition will be raised. To invoke Type II G71, specify both an X and Z move in the "P" referenced block. This can either be done by specifying the same Z coordinate as the Z park position of the tool, Z1.419 in your case, or W0.0 can be used.

Having now read the whole of your program, I believe you will still get an error if Type II G71 is invoked, with a Zero Z move in the "P" referenced block. The G71 cycle doesn't tolerate a non-monotonous in Z in any circumstance.

There are many versions of the G71 cycle within the two Types. Some versions don't recognize G41/G42 at all, some cancel TRC on entry to the cycle and restart it on the first move block after the "P" referenced block. I believe in your case the tool will be moving in a plus direction when it moves to X1.72 Z1.419 in the "P" referenced block. Even though Z1.419 is not specified its Modal in that block. If there is room, specify a Z move in the "P" referenced block that is in a Z minus direction from your start of Z1.419

Regards,

Bill
 
Also, if I disable tool nose radius compensation (by changing G42 to G40), the program runs without errors.

Code:
(OD Turning)
M0
M22
G40 G28 U0 W0
T0707 M16
G96 S1000
G0 X3.0 Z3.0 M3

[B]G42[/B] Z1.419 X2.8 /M8
G71 U0.04 R0.05
G71 P1 Q2 U0.005 W0.003 F0.020
N1 G0 X1.72
G1 Z1.319
X1.92 Z1.219
(G2 X1.9200 Z1.2190 R0.1)
G3 X2.0000 Z1.1790 R0.04
G1        Z0.5253
G2 X2.2600 Z0.3402 R0.1969
G1 X2.4942 Z0.2855
[B]G3 X2.5000 Z0.2810 R0.005
G1        Z0.1000
N2 X2.5500[/B]
G70 P1 Q2 F0.004

G0 [COLOR=#ff0000][B]G40[/B][/COLOR] Z3.0 X3.0

Matt

Are you by any chance running a .032 rad tool? ( on edit: Yupp, I see you said so :dopeslap: )
Without canceling the comp ( red G40 ), you can't go from X2.500 to X2.550 in your Q ( N2) block.

The code is rather ugly ( sorry ;) ), but see if you can cheat it by putting in a .015 tool rad in the offsets while leaving the G42 in there.

Better yet, change N2 X2.55 to N2 X2.6 and leave all else as it is, but still cancel comp at some point.
 
Last edited:
Taking a cue from what Bill has suggested, the problem seems to be with the z-finishing allowance in G71 which offsets the profile.
Try 0 value (W0 in the second G71 block) and see if it works.
If yes, modify the G42 move appropriately. (Say, G42 Z1.5 X2.8 /M8)

Just a guess. May not work.
 
There are many versions of the G71 cycle within the two Types. Some versions don't recognize G41/G42 at all, some cancel TRC on entry to the cycle and restart it on the first move block after the "P" referenced block. I believe in your case the tool will be moving in a plus direction when it moves to X1.72 Z1.419 in the "P" referenced block. Even though Z1.419 is not specified its Modal in that block. If there is room, specify a Z move in the "P" referenced block that is in a Z minus direction from your start of Z1.419

I added a Z1.319 to my "P" reference block,

Code:
N1 G0 X1.72 Z1.319
G1 X1.92 Z1.219

and I got the error "PS0323 The first block of shape program is a command of type 2". Does this mean that my control doesn't support type 2 commands?
 
Matt

Are you by any chance running a .032 rad tool? ( on edit: Yupp, I see you said so :dopeslap: )
Without canceling the comp ( red G40 ), you can't go from X2.500 to X2.550 in your Q ( N2) block.

The code is rather ugly ( sorry ;) ), but see if you can cheat it by putting in a .015 tool rad in the offsets while leaving the G42 in there.

Better yet, change N2 X2.55 to N2 X2.6 and leave all else as it is, but still cancel comp at some point.

This took me a little while to understand, so I tried it last, but it makes sense. It would, however, seem to me that I should be able to make a right angle move like that by going only 1 radius in the x-direction (so 2.500+0.032 = 2.532), but clearly that didn't work. Do I have to go a minimum of 2x the radius? So 2.564"? I tried 2.6", and it worked (all else the same as the code posted above). I'm going to go try 2.564" now.

Matt
 
The code is rather ugly ( sorry ;) )

No offense taken. Can you please provide an example or coding style guidelines? I'm all ears (or eyes?). I'm a strong believer in writing code that is very easy to read, but I'm not sure what style is easiest to read in g-code.

Also, I tried 2.5 + 2*R = 2.563", and this works! If I use 2.5629", I get the error code. It's good to know that at a 90 degree angle, it needs to be at least 2x radius of a move. I guess this makes sense, because 2x radius on the diameter means that the cutter moves 1 radius (or in this case, not at all). It all makes so much more sense now. I appreciate everyone for helping me out.

Matt
 
I added a Z1.319 to my "P" reference block,

Code:
N1 G0 X1.72 Z1.319
G1 X1.92 Z1.219

and I got the error "PS0323 The first block of shape program is a command of type 2". Does this mean that my control doesn't support type 2 commands?

Hi Matt,
Normally a different error message is raised if Type II is not available, something like illegal axis command, or words to that effect. To Test for the availability of G71 Type II, delete the G42 so that you don't get an error due to that and change the "P" referenced block to as follows:

N1 G0 X1.72 W0.0

If you still get the "PS0323 The first block of shape program is a command of type 2" error, then your control does not have the Type II option.

Regards,

Bill
 
It is a good example of radius-compensation intricacies. This could be a possible explanation:
At the 90-deg corner, the "circle" positions itself so as to be tangent to both horizontal and (extended) vertical lines. In the next move, it has to be tangent to the vertical line at its end point. This would cause a negative X motion if the length of the vertical line is smaller than the radius of the circle.
 
Can you please provide an example or coding style guidelines? I'm all ears (or eyes?). I'm a strong believer in writing code that is very easy to read, but I'm not sure what style is easiest to read in g-code.

Also, I tried 2.5 + 2*R = 2.563", and this works! If I use 2.5629", I get the error code. It's good to know that at a 90 degree angle, it needs to be at least 2x radius of a move. I guess this makes sense, because 2x radius on the diameter means that the cutter moves 1 radius (or in this case, not at all). It all makes so much more sense now. I appreciate everyone for helping me out.

Matt


Matt, don't sweat my ugly comment, I am a syntax nazi.
I don't like G1, M1, skipping modal codes, I want a single leading 0 before the decimal, want spaces between words etc.....

As far as the 90 deg move with only 1/2R, that is only true if the block is the comp cancel block, hence the addition of the G40 in red.

The way you've had the code written, the tool was going towards the chuck with comp right. At the end of block N2 the tip was at X2.500.
But then you've told it to go to X2.55 and away from the chuck ( from Z.1 to Z3.) , while remaining in comp-right, which would have put the tool to X2.487 ( X2.550-2xtipR)

Willing to bet that you had .0315 put into the offset register, hence the error at 2.5629 and not at 2.563.
 
I do not have definite answers for the following. Would appreciate any input on this:
1. If G42 is inserted in the P-block (only), will G71 use it or ignore it?
2. When G42 is commanded before G71, does G71 use it in both roughing as well as step-removal operations, or only in the step-removal operation (in such a case, sufficient finishing allowances would have to be specified)?
 
My exp...

Recently acquired a Takisawa TC-203j, with a Fanuc control (not really sure which one, I think it's a Fanuc OiT, but correct me if I'm wrong.). I'm writing my programs by hand, and having a lot of fun with it. Anyhow, I'm getting the following error, which from my understanding, means that I cannot have undercuts (I can't go z-negative, and then reverse direction and go Z-positive). I don't see where in my code I change directions in the Z or the X axis, except right in the beginning. Also, if I disable tool nose radius compensation (by changing G42 to G40), the program runs without errors. The relevant code that I think is relevant is below (and the full version is here: Pastebin.com - Not Found (#404)

Code:
(OD Turning)
M0
M22
G40 G28 U0 W0
T0707 M16
G96 S1000
G0 X3.0 Z3.0 M3

G42 Z1.419 X2.8 /M8
G71 U0.04 R0.05
G71 P1 Q2 U0.005 W0.003 F0.020
N1 G0 X1.72
G1 Z1.319
X1.92 Z1.219
(G2 X1.9200 Z1.2190 R0.1)
G3 X2.0000 Z1.1790 R0.04
G1 	   Z0.5253
G2 X2.2600 Z0.3402 R0.1969
G1 X2.4942 Z0.2855
G3 X2.5000 Z0.2810 R0.005
G1 	   Z0.1000
N2 X2.5500
G70 P1 Q2 F0.004

G0 Z3.0 X3.0

So as I single step through this program, I get the PS0329 error message after it enters the G71 cycle. Also in the geometry offsets, the tool nose radius is set to 0.0315", and the tool type is set to "3". The values in the wear registers are all zeroed out. I drew out the program in SolidWorks and it looks exactly like it should. I'm a bit stuck, please advise!


Thanks,
Matt





The Fanuc control on my doosan does not allow an undercut in a canned cycle.
it will alarm out with -
"the finishing shape is not a monotonous change"

Lee
 








 
Back
Top