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:

Okuma code help


Leigh @ Kodiak
 Share

Recommended Posts

The attached code works OK on the machine, but I can't figure out why the spindle is stopping at the end of the sub program and starting up again in the next sub call. . Any OKUMA masters that can help me to keep my spindle going?

 

 

 

G00 G17 G20 G40 G80 G90

NSTART
IF[VPLTK EQ 1]N1000
IF[VPLTK EQ 2]N2000
N1000
VZOFX[1]=-8.000 VZOFY[1]=4.000 VZOFZ[1]=-2.7295
VZOFX[2]=0.000  VZOFY[2]=4.000 VZOFZ[2]=-2.7280
VZOFX[3]=8.000  VZOFY[3]=4.000 VZOFZ[3]=-2.7300
VZOFX[4]=8.000  VZOFY[4]=-4.000 VZOFZ[4]=-2.7300
VZOFX[5]=0.000  VZOFY[5]=-4.000 VZOFZ[5]=-2.7295
VZOFX[6]=-8.000 VZOFY[6]=-4.000 VZOFZ[6]=-2.7305
T18 M06 (1/8 DRILL)
N11 M01
M356 T6
RP=1 M289
G15 H1
G00 G17 G90 X1.8144 Y-2.0151 S5000 M03
G56 H18 Z1.5
M08
CALL O0001
/G15 H2
/G90 X1.8144 Y-2.0151
/CALL O0001
/G15 H3
/G90 X1.8144 Y-2.0151
/CALL O0001
/G15 H4
/G90 X1.8144 Y-2.0151
/CALL O0001
/G15 H5
/G90 X1.8144 Y-2.0151
/CALL O0001
/G15 H6
/G90 X1.8144 Y-2.0151
/CALL O0001
M09
M05
M01
M60
GOTO NSTART
G90
G0 Z1000.
M30

O0001
G94
G71 Z1.5
G81 X1.8144 Y-2.0151 Z-.0876 R.22 F15. M53
X.6878 Y2.5669
X-1.8144 Y2.0151
X-2.2835 Y0.
X-.6878 Y-2.5669
G80
RTS


Link to comment
Share on other sites

The G80 is causing it to stop.

I've had the same thing happen to me, and it's not subprogram related because I haven't ran a sub on my Okuma in a long time.

 

Edit:

I think it's because the G80 is by itself on it's own line, try changing it to G00G80 or add in an S code.

Link to comment
Share on other sites

like this it should work without stopping the spindle

 

it's only the position of the G80 the problem

 

G00 G17 G20 G40 G80 G90

NSTART
IF[VPLTK EQ 1]N1000
IF[VPLTK EQ 2]N2000
N1000
VZOFX[1]=-8.000 VZOFY[1]=4.000 VZOFZ[1]=-2.7295
VZOFX[2]=0.000  VZOFY[2]=4.000 VZOFZ[2]=-2.7280
VZOFX[3]=8.000  VZOFY[3]=4.000 VZOFZ[3]=-2.7300
VZOFX[4]=8.000  VZOFY[4]=-4.000 VZOFZ[4]=-2.7300
VZOFX[5]=0.000  VZOFY[5]=-4.000 VZOFZ[5]=-2.7295
VZOFX[6]=-8.000 VZOFY[6]=-4.000 VZOFZ[6]=-2.7305
T18 M06 (1/8 DRILL)
N11 M01
M356 T6
RP=1 M289
G15 H1
G00 G17 G90 X1.8144 Y-2.0151 S5000 M03
G56 H18 Z1.5
M08
CALL O0001
/G15 H2
/G90 X1.8144 Y-2.0151
/CALL O0001
/G15 H3
/G90 X1.8144 Y-2.0151
/CALL O0001
/G15 H4
/G90 X1.8144 Y-2.0151
/CALL O0001
/G15 H5
/G90 X1.8144 Y-2.0151
/CALL O0001
/G15 H6
/G90 X1.8144 Y-2.0151
/CALL O0001
G80 M09
M01
M60
GOTO NSTART
G90
G0 Z1000.
M30

O0001
G94
G71 Z1.5
G81 X1.8144 Y-2.0151 Z-.0876 R.22 F15. M53
X.6878 Y2.5669
X-1.8144 Y2.0151
X-2.2835 Y0.
X-.6878 Y-2.5669
RTS

Link to comment
Share on other sites

Replace the "G80" with a "G0". That what we use after every drill cycle.

 

Here is a piece of a file that I am running right now.

 

IF[VTLCN EQ 7] N190

T7 M06 ( 7/16 CARBIDE DRILL)

N190 M01

(MAX - Z.7792)

(MIN - Z-1.3438)

S1311 M3

G15 H2

G56 H7

CALL OO88 PX=VC10 PY=VC11 PZ=VC12 PA=-25. PC=270. PH=2 PP=52

G00 G17 G90 A-25. C270.

X-.7598 Y.1699 T60

Z.7792 M51

M279

G94

G71 Z.7792

G81 Z-1.3438 R.1792 F9.18 M53

G0 ----------------------------- here is the G0

G30 P2

G56 H7

CALL OO88 PX=VC10 PY=VC11 PZ=VC12 PA=0. PC=0. PH=2 PP=52

G00 A0. C0.

X-.3125 Y-.5098

Z.7

G71 Z.7

G81 Z-1.215 R.1 F9.18 M53

G0 ---------------------------- here is the G0

M205

M5

G30 P2

M278

G90

A0 M404 C0

Y20.

M02

  • Like 1
Link to comment
Share on other sites

I have found that on a series of drill cycles at different depths, when G80 is removed machine drills to the depth of previous cycle before depth of present cycle (can be dangerous). Anyone else found this? (OSP5020M controller)

 

to avoid this , simply set the post processor to output the XYZ value at each hole

Link to comment
Share on other sites

I use this format with a G00 to the G71 ref plane

 

N12 G116 T4

M11

M27

G15 H1

G0 X101.093 Y-19.557 S3000 M3

G0 G90 A-90. C0. M116

T2

M10

M26

G56 H=VATOL Z25.

M8

M120 (SHOWER COOLANT)

G71 Z25.

G81 X101.093 Y-19.557 Z-3. R5. F300. M53

X89.587 Y-64.007

X101.093 Y-92.582

X65. Y-85.496

X27.789 Y-60.832

G0 Z25.

M9

M5

G30 P3 (HOME)

S500 M03

M12 (TOOL CLEANING AIR BLOW)

G4 P3.0

M9

M5

G30 P3

M01

Link to comment
Share on other sites
If you don't have a G80, and just a G0 with a move to a retraction plane, will this cancel the cycle?

 

Yes, here's a snippet of code that has run thousands of pieces (note this is a hand-write, the NCYL and BHC calls aren't output in a posted program):

 

G15 H20 X0. Y1.1515 S4244 M3

G56 H2 Z.25 M8

G71 Z.1

NCYL G81 Z-.055 R.100 F.003 M53

BHC X0. Y0. I1.1515 J90. K12.

G00 Z.100

X0. Y.4725 S2604 M3

G71 Z.100

NCYL G81 Z-.254 R-.057 F.003 M53

BHC X0. Y0. I.4725 J90. K8.

G00 Z.100

M9

G53 M5

G30 P1

M01

 

Here's what my Okuma post looks like after I changed G80 to G00:

 

# Changed pg80_out to output G00 instead of G80 (G80 stops spindle) (cdm)

 

pg80_out #Cancel canned drill cycle

result = newfs (three, zinc)

result = newfs (15, feed)

z = initht

if cuttype = one, prv_zia = initht + (rotdia/two)

else, prv_zia = initht

if initht > refht, ret_ht = initht

else, ret_ht = refht

pxyzcout

!zabs, !zinc

prv_gcode = zero

pbld, n, "G00", *ret_ht, e

g80_out = zero

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...