OSP Internal Subprograms

Started by JakeL, April 04, 2025, 11:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JakeL

We have a production part that we run on our Matsuura's (Fanuc 31i). We're planning on running this part on one of the Okuma's (OSP P300 .. I think). The program uses internal subs, on the Fanuc the format is:

T1 M6
(P1)
G0 G90 G54.1 P1 X1. Y1. S5000 M3
G43 H1 Z1.0
M98Q40001
(P2)
G90 G54.1 P2 X1. Y1.
Z1.0
M98Q40001
M01
M30

N40001 (T1 Sub)
(T1 GCODE)
M99

Will this same format work on the OSP? If not, what is the correct format? (I'm assuming OSP can use internal subs?)

Unfortunately I don't have access to the control right now, but if more information is needed I can get it. Hoping this is a simple question with a simple solution.

gcode

Our Okuma VTM-1200 5X lathe with an OSP 300

an internal sub is called like this

N4000 CALL O3064

the end of the main program is M02


The sub is defined as

O3064 (396814_vtm-SUBO3064)
(ROUGH POCKETS)
N100 G00 Z20.23
N110 G94 G01 Z20.13 F125.
*
*
*
the end of the sub is
N1390 RTS  which will loop back to the first line following the
CALL command.

our Postability post outputs this edit free





Like Like x 2 Thank  You Thank You x 1 View List

JakeL

Thank you! I'll report back if/when we run this.

Jeff

Quote from: gcode on April 04, 2025, 12:08 PMOur Okuma VTM-1200 5X lathe with an OSP 300

an internal sub is called like this

N4000 CALL O3064





I haven't worked much with subs in a LONG time, but I seem to remember Okuma sub calls had to start with a letter after the O.
Like CALL OABCD
Were you always able to use numbers like O1234?  :headscratch:

gcode

#4
Quote from: Jeff on April 08, 2025, 04:47 AMWere you always able to use numbers like O1234?  :headscratch:

Using O numbers is the only way I've ever done it.
There was no one here who spoke Okuma when we bought our first one and between the instruction manuals and
Postability's help that's what I came up with.

Given the power built into Okuma's macro language I'm sure there are other ways to call subs.

Like Like x 1 View List

mkd

CALL, MODIN and MODOUT all make use of external subs, afaik.
 A Schedule program might be a good way to organize a series of subs and main
*.SDF
Like Like x 1 View List