PDA

View Full Version : Subprograms, Okuma Lathe LT10 Osp-U100L ?



Kai_DK
11-27-2007, 01:25 AM
Hi.
The guys selling Okuma in Denmark keeps saying that Okuma cannot use subprograms (M98-M99).
Can anyone please confirm this, or even better, prove them wrong?
Regards
Kai

Kai_DK
11-27-2007, 06:19 AM
Maybe the correct word to use in the headline would be subroutines

slavetothemetal
11-28-2007, 05:44 AM
Kai,
Change M98P to CALL O and replace the M99 at the end of the subroutine with RTS. You should be golden.

Kai_DK
11-28-2007, 08:36 AM
Ok, thank you.

slavetothemetal
11-28-2007, 09:18 AM
Certainly

broby
11-29-2007, 09:14 AM
Hello Kai_DK
If the guys that are selling the machine don't know how to use subroutines, I would be a lot worried about there level of understanding of these machines/controllers!
Anyway to clarify the statements made...
the equivalent of the Fanuc M98P... command is indeed "CALL O1234" where the numbers 1234 represent the subprogram number. This subprogram number can actually be any Alphanumeric upto 4 characters long, after the leading "O" (letter oh not number zero), if using alpha characters I seem to remember in one of the manuals I read long ago, that you must commence the subprogram name with an alpha char and then you could use numbers, not the other way around.
ie Valid Names = OFRED or OCH12 or OA123
Invalid Names would be O1ABC or O123Z etc...

So an example program to mill a 100mm square 10mm deep might be like this...
Assuming X0 Y0 is bottom LH corner! Z0 top surface.
Main program...

M3 S1000
M8
G0 X-20 Y-20
G56 HA Z800
Z10
G1 Z-2 F1000
CALL OSQR
G1 Z-4 F1000
CALL OSQR
G1 Z-6 F1000
CALL OSQR
G1 Z-8 F1000
CALL OSQR
G1 Z-10 F1000
CALL OSQR
G0 Z10.
M5
M9
Etc...

OSQR (SUB TO MILL SQUARE)
G1 G41 DA X0 F500
Y100
X100
Y0
X-20
G40 X-20 Y-20
RTS (This is the equiv to M99 in Fanuc)

Another much leaner way of programming the same thing is to use the MODIN and MODOUT commands (see below)
The MODIN command acts the same as a CALL statement and the MODOUT command cancels the MODIN Statement.
The machine CALLS the subroutine every time a move takes place in the main program. You must use the MODOUT command at the end of the calls so that it stops calling the subroutine.
This is much easier to program as you can easily update the depth of cuts in this program.

M3 S1000
M8
G0 X-20 Y-20
G56 HA Z800
Z10
MODIN OSQR
G1 Z-2 F1000
G1 Z-4 F1000
G1 Z-6 F1000
G1 Z-8 F1000
G1 Z-10 F1000
MODOUT
G0 Z10.
M5
M9
Etc...

OSQR (SUB TO MILL SQUARE)
G1 G41 DA X0 F500
Y100
X100
Y0
X-20
G40 X-20 Y-20
RTS (This is the equiv to M99 in Fanuc)

Hope this information helps you get going.
If you need more help, please ask!
Regards
Brian.

Kai_DK
12-03-2007, 07:32 AM
Thank you very much for this information.
I'm only the messenger in this matter and cannot be the judge over the matter if the shop or the guys have been given the wrong information :drowning: