Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

G70 P & Q Numbering


Recommended Posts

I have a problem in my post. It will outpu the P and Q from the first OP for every finsih (G70) op. Can anyone help. Thx !

 

This is my current output:

code:

(TOOL - 1 OFFSET - 1)

(OD ROUGH RIGHT - 80 DEG.)

( FACE RGH )

N1 G28 U0. W0.

G50 X0. Z0. S1000 T0100

G96 S500 M03

G0 X10.4 Z.15 T0101 M8

G41 X10.3 Z.1

G72 W.05 R0.

G72 P100 Q101 U.01 W.005 F.025 <----- P100 Q101

N100 G0 G41 Z-.0625 S500

G1 X10.

G2 X9.875 Z0. R.0625

G1 X2.

N101 G40 Z.1

( OD RGH )

G0 X10.3 Z.0375

Z.0875

G42 X10.2 Z.0375

G71 U.05 R0.

G71 P102 Q103 U.01 W.005 F.025 <---P102 Q103

N102 G0 G42 X10. S500

G1 Z-1.1438

N103 G40 X10.2

M9

G28 U0. W0. M05

T0101

M01

(TOOL - 11 OFFSET - 11)

(OD FINISH RIGHT - 35 DEG.)

( FACE FNS )

N2 G28 U0. W0.

G50 X0. Z0. S1500 T1100

G96 S500 M03

G41 G0 X10.3 Z-.0625 T1111 M8

G70 P100 Q101 <--- THIS ONE IS RIGHT

( OD FNS )

G0 G42 X10.

G70 P100 Q101 <--- THIS P & Q SHOULD BE 102 & 103 RESPECTIVELY

M9

G28 U0. W0. M05

T1111

M30

banghead.gif

Link to comment
Share on other sites

The Lathe Canned Cycle numbering be be very tricky to diagnose. You wouldn't think so as "It's just sequence numbers!", but it can be.

If someone who knows MP Posts and had a copy of your PST and your sample MCX file they could determine what is happening.

 

But diagnosing this with just a "here is my NC code", without even knowing...

Is the PST based off of the CNC MPLFAN.PST or is it from the In-House MPLMASTER.PST

and also what mods you've done to the PST.

Let's just say the chances are slim. ;(

 

I'd suggest contacting your Dealer, as they can help you out on this.

Link to comment
Share on other sites

If I am not mistaken, nearly all MPLFAN based posts, including my very expensive Integrex post suffer from this.

 

IMO, this is a huge detrement to Mastercam and I know I am not alone in saying that CNC should address this, since it has existed since at least version 9 (when I started using MC). I dont want to rant, but getting bigger and brighter software is great but if the post issues that seem to be from 10+ years ago never get addressed, what is the point?

 

JM2C

Link to comment
Share on other sites

Well I have finnaly found what nakes my post screw up the P & Q for G70.

 

code:

pread_g70       #Read G70 recall buffer

foundcc = zero

size2 = rbuf (two, zero)

#wc2 = one <------- Removed for correct G70 P & Q. 07/13/09

while wc2 <= size2 & foundcc = zero,

[

fcc_subid = rbuf (two, wc2)

if fcc_subid = sub_op_id$,

[

gcodecc = zero

ng70s = fcc_ng70s

ng70e = fcc_ng70e

pbld, n$, *scclgcode, *ng70s, *ng70e, e$

foundcc = one

]

]

Link to comment
Share on other sites

William, that may get you the solution for the line numbers, which is great! But I have my doubts that it removes the crash problem with the G70's...where the X diamater starts at the smallest (od) or biggest (id) diameter, calls the G70 and then theoretically would rapid thru the part.

 

If you can get that straigtened out, you will be an emastercam Guru! wink.gif

Link to comment
Share on other sites

Actually I dont have that problem, The only problem I have with the G70s is that it will start the Z at N1s Z and that command basically drags the cutting edge across the just finished face.

code:

G72 P100 Q101 U.01 W.005 F.025

N100 G0 G41 Z-.0625 S500

G1 X10.

G2 X9.875 Z0. R.0625

G1 X2.

N101 G40 Z.1

.......

N2 G28 U0. W0.

G50 X0. Z0. S1500 T1100

G96 S500 M03

G41 G0 X10.3 Z-.0625 T1111 M8 <--- right here, Im working on it right now.

G70 P100 Q101

( OD FNS )

G0 G42 X10.

G70 P102 Q103

Link to comment
Share on other sites

William, I believe you did not fix the problem by commenting out that line. Commenting out that line prevents searching the buffered P&Q number records from the beginning of the buffer file. If you have multiple canned rough operations, say canned rough op1, op2 and op3, after these operations, you want to do a canned finish op1 which is the finish operation of canned rough op1, you won't get the output of P&Q number because you commented out that line.

 

It happened to fix your problem probably because you have your canned finish operation right after your canned rough operation. Even though it does not search from the beginning, it can find the P&Q number in the buffer file because that record happens to be the last record in the buffer file.

 

The real problem seems to be the sequence number is reset at the canned finish operation by MP when the sequence number output is omitted in the control definition. If you do not omit the sequence number output in the control definition, you should be able to get the correct P&Q number.

 

If you do want to omit the sequence number output, the work around is to have your own variable to save the sequence number instead of using the pre-defined 'n$' variable. You need to modify the post block 'prcc_call_end$'. (see sample modified code below)

 

myn : 100 # sequence number to be output when omitseq$ = one

 

prcc_call_end$

......

if omitseq$ = one,

[

# ng70s = n$

# ng70e = n$ + seqinc$

ng70s = myn

ng70e = ng70s + seqinc$

myn = ng70e

]

else,

[

# if old_new_sw = zero, ng70s = n$ + seqinc$

# else, ng70s = n$ + (seqinc$ * two)

if old_new_sw = zero, ng70s = myn + seqinc$

else, ng70s = myn + (seqinc$ * two)

ng70e = ng70s + (seqinc$ * (size3 - one))

myn = ng70e

]

......

Link to comment
Share on other sites

Here is the program I was using to edit the post, it has face, od, drilling, id, rough and finish.

code:

%

O9030(TEST)

G20

(CREATED ON 13-07-09 AT 14:20 )

(TOOL - 1 OFFSET - 1)

(OD ROUGH RIGHT - 80 DEG.)

( FACE RGH )

N1 G28 U0. W0.

G50 X0. Z0. S1000 T0100

G96 S500 M03

G0 X10.4 Z.15 T0101 M8

G41 X10.3 Z.1

G72 W.05 R.015

G72 P100 Q101 U.01 W.005 F.025

N100 G0 G41 Z-.0625 S500

G1 X10.

G2 X9.875 Z0. R.0625

G1 X2.

N101 G40 Z.1

( OD RGH )

G0 X10.3 Z.0375

Z.0875

G42 X10.2 Z.0375

G71 U.05 R.015

G71 P102 Q103 U.01 W.005 F.025

N102 G0 G42 X10. S500

G1 Z-1.1438

N103 G40 X10.2

M9

G28 U0. W0. M05

M01

(TOOL - 11 OFFSET - 11)

(OD FINISH RIGHT - 35 DEG.)

( FACE FNS )

N2 G28 U0. W0.

G50 X0. Z0. S1500 T1100

G96 S500 M03

G41 G0 X10.3 Z-.0625 T1111 M8

G70 P100 Q101

( OD FNS )

G0 G42 X10.

G70 P102 Q103

M9

G28 U0. W0. M05

M01

(TOOL - 3 OFFSET - 3)

(INSERT DRILL - 2.0 DIA)

( 2" DRILL )

N3 G28 U0. W0.

G50 X0. Z0. S1000 T0300

G97 S955 M03

G0 X0. Z.5 T0303 M8

G81 Z-1.7437 Q.25.05 R.02 F.008

G80

G0 Z.5 M9

G28 U0. W0. M05

M01

(TOOL - 5 OFFSET - 5)

(ROUGH RIGHT - 80 DEG.)

( ID RGH )

N4 G28 U0. W0.

G50 X0. Z0. T0500

G96 S500 M03

G0 X1.9 Z.15 T0505 M8

G41 X2. Z.1

G71 U.05 R.015

G71 P104 Q105 U-.01 W.005 F.025

N104 G0 G41 X3.75 S500

G1 Z0. F.01

G2 X3.6875 Z-.0313 R.0313

G1 Z-.1437

N105 G40 X2.

G0 Z.1

M9

G28 U0. W0. M05

M01

(TOOL - 7 OFFSET - 7)

(ID FINISH MIN. 1.0 DIA. - 55 DEG.)

( ID FNS )

N5 G28 U0. W0.

G50 X0. Z0. S1500 T0700

G96 S500 M03

G41 G0 X3.75 Z.1 T0707 M8

G70 P104 Q105

M9

G28 U0. W0. M05

M01

M00

 

(Flip Stock)

(TOOL - 1 OFFSET - 2)

(OD ROUGH RIGHT - 80 DEG.)

( FACE RGH2 )

N6 G28 U0. W0.

G50 X0. Z0. S1000 T0100

G96 S500 M03

G0 X10.4 Z.161 T0102 M8

G41 X10.3 Z.111

G72 W.05 R.015

G72 P106 Q107 U.01 W.005 F.025

N106 G0 G41 Z-.0625 S500

G1 X10.

G2 X9.875 Z0. R.0625

G1 X2.

N107 G40 Z.111

( OD RGH2 )

G0 X10.3 Z.1

Z.15

G42 X10.2 Z.1

G71 U.05 R.015

G71 P108 Q109 U.01 W.005 F.025

N108 G0 G42 X7.0225 S500

G1 Z0.

G3 X7.085 Z-.0313 R.0313

G1 Z-.364

X9.9375

G3 X10. Z-.3952 R.0313

N109 G1 G40 X10.2

M9

G28 U0. W0. M05

M01

(TOOL - 11 OFFSET - 12)

(OD FINISH RIGHT - 35 DEG.)

( FACE FNS2 )

N7 G28 U0. W0.

G50 X0. Z0. S1500 T1100

G96 S500 M03

G41 G0 X10.3 Z-.0625 T1112 M8

G70 P106 Q107

( OD FNS2 )

G0 G42 X7.0225

G70 P108 Q109

M9

G28 U0. W0. M05

M01

(TOOL - 5 OFFSET - 6)

(ROUGH RIGHT - 80 DEG.)

( ID RGH2 )

N8 G28 U0. W0.

G50 X0. Z0. S1000 T0500

G96 S500 M03

G0 X3.3875 Z.15 T0506 M8

G41 X3.4875 Z.1

G71 U.05 R.015

G71 P110 Q111 U-.01 W.005 F.01

N110 G0 G41 X6.5225 S500

G1 Z0.

G2 X6.46 Z-.0313 R.0313

G1 Z-.864

G3 X6.21 Z-.989 R.125

G1 X4.5625

G2 X4.5 Z-1.0203 R.0313

G1 Z-1.364

X3.75

G2 X3.6875 Z-1.3953 R.0313

N111 G1 G40 X3.4875

G0 Z.1

M9

G28 U0. W0. M05

M01

(TOOL - 7 OFFSET - 8)

(ID FINISH MIN. 1.0 DIA. - 55 DEG.)

( ID FN2 )

N9 G28 U0. W0.

G50 X0. Z0. S1500 T0700

G96 S500 M03

G41 G0 X6.5225 Z.1 T0708 M8

G70 P110 Q111

G0 Z0.

X3.6875

M9

G28 U0. W0. M05

M30

%

This output is obtained with that line commented out, now I do have sequence disabled in the Control but I have omitseq$ = -1 , To enable for LCC maybe thats why it still works. Also in the control I have the sequence start at 100 & Inc 1, eventhoug the swith is disabled. By any chance do you know how I can get rid of the neg coordinate right before the G70?

Link to comment
Share on other sites

Both enabling for LCC or not omitting the sequence number make the n$ correct, you should get the correct output without commenting out that line 'wc2 = one'.

 

In your NC file, you perform all the canned finish cycles in the order their canned rough cycles are created, that is why you get the correct output. My guess is if you switch your finish operations to do (OD FNS) first and (FACE FNS) second, you will see the problem of commenting that line, you won't get the correct output for operation (FACE FNS).

 

Not sure which neg coordinate before G70 you want to get rid of. Not every G70 line in your NC output has a neg coordinate before it.

Link to comment
Share on other sites

Here is the posted output with those switched.

 

code:

%

O9030(TEST)

G20

(CREATED ON 14-07-09 AT 06:21 )

(TOOL - 1 OFFSET - 1)

(OD ROUGH RIGHT - 80 DEG.)

( FACE RGH )

N1 G28 U0. W0.

G50 X0. Z0. S1000 T0100

G96 S500 M03

G0 X10.4 Z.15 T0101 M8

G41 X10.3 Z.1

G72 W.05 R0.

G72 P100 Q101 U.01 W.005 F.025

N100 G0 G41 Z-.0625 S500

G1 X10.

G2 X9.875 Z0. R.0625

G1 X2.

N101 G40 Z.1

( OD RGH )

G0 X10.3 Z.0375

Z.0875

G42 X10.2 Z.0375

G71 U.05 R0.

G71 P102 Q103 U.01 W.005 F.025

N102 G0 G42 X10. S500

G1 Z-1.1438 F.01

N103 G40 X10.2

G0 Z.0375

M9

G28 U0. W0. M05

M01

(TOOL - 11 OFFSET - 11)

(OD FINISH RIGHT - 35 DEG.)

( OD FNS )

N2 G28 U0. W0.

G50 X0. Z0. S1500 T1100

G96 S500 M03

G42 G0 X10. Z.0375 T1111 M8

G70 P100 Q101

( FACE FNS )

G0 G41 X10.3

G70 P102 Q103

M9

G28 U0. W0. M05

M01

(TOOL - 3 OFFSET - 3)

(INSERT DRILL - 2.0 DIA)

( 2" DRILL )

N3 G28 U0. W0.

G50 X0. Z0. S1000 T0300

G97 S955 M03

G0 X0. Z.5 T0303 M8

G81 Z-1.7437 Q.25.05 R.02 F.008

G80

G0 Z.5 M9

G28 U0. W0. M05

M01

(TOOL - 5 OFFSET - 5)

(ROUGH RIGHT - 80 DEG.)

( ID RGH )

N4 G28 U0. W0.

G50 X0. Z0. T0500

G96 S500 M03

G0 X1.9 Z.15 T0505 M8

G41 X2. Z.1

G71 U.05 R0.

G71 P104 Q105 U-.01 W.005 F.025

N104 G0 G41 X3.75 S500

G1 Z0. F.01

G2 X3.6875 Z-.0313 R.0313

G1 Z-.1437

N105 G40 X2.

G0 Z.1

M9

G28 U0. W0. M05

M01

(TOOL - 7 OFFSET - 7)

(ID FINISH MIN. 1.0 DIA. - 55 DEG.)

( ID FNS )

N5 G28 U0. W0.

G50 X0. Z0. S1500 T0700

G96 S500 M03

G41 G0 X3.75 Z.1 T0707 M8

G70 P104 Q105

M9

G28 U0. W0. M05

M30

%

On the previous post:

code:

(TOOL - 11 OFFSET - 11)

(OD FINISH RIGHT - 35 DEG.)

( FACE FNS )

N2 G28 U0. W0.

G50 X0. Z0. S1500 T1100

G96 S500 M03

G41 G0 X10.3 Z-.0625 T1111 M8 <-----this right here

G70 P100 Q101

( OD FNS )G0 G42 X10.

G70 P102 Q103

M9

G28 U0. W0.

M05

M01

If there is a problem where can I fix it.

Link to comment
Share on other sites

The P&Q numbers look wrong to me for the operation (OD FNS) and (FACE FNS) in your output, they are swapped. This is what I meant when you commenting out that line of 'wc2 = one'. But I am surprised that you get the P&Q numbers for operation (FACE FNS). I can not tell why without looking at your post and MCX.

 

The line before G70 should be output from post block 'ltlchg$'.

Link to comment
Share on other sites

Ok, Now I know what is the real problem. The 'sub_op_id$' is zero for all the buffered records once you have the stock flip operation (I am not sure if other misc operations will cause the same problem). It appeared to be a bug but I need to investigate more to confirm it. The workarounds I mentioned above (not omitting sequence number, or the post modification above) won't work you. For now, commenting out that line ('wc2 = one') and use the same order for the canned finish cycle as you create the canned rough cycle might be the only workaround.

 

I will let you know if I get more information.

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...