What's new
What's new

User Task/ Macro Question

Donny Baker

Plastic
Joined
Jun 26, 2012
Location
Michigan, USA
We just bought a okuma v4020 with the osp5020 control. This machine is my first experience with an okuma control, and macro programming. I've wrote some circle milling programs, but couldn't get the rounding function to work. I was able to work around it, but if I could get an example of the rounding up it would make the program alot more useful.
 
don't have much mach. center exp., but have been using Okuma lathes for years. maybe the most user-friendly, versitle family of parts/custom macro programming you can find. i use... RPM=[ROUND IPM*V6] to round
would imagine... RPM=[FUP IPM*V6] would round up
hope this helps
 
Here is the program I wrote to do a helical entry circle mill. When I get the rounding function to work instead of telling the control how many depth cuts to make, you'll tell it the maximum depth per step down.

$O1001.SSB%
(WORKS 4-12-12)
(CIRCLE MILLING HEILCAL ENTRY)
(TURN SPINDLE ON)
(TURN COOLANT ON)
(ACTIVATE TOOL LENGTH COMP)
(POSITION TO START POINT)
(SET IN MAIN PROGRAM)
(SSPD=SPINDLE SPEED IN SFM)
(FEED=IPR)
(ZSUR=Z TOP OF HOLE)
(XLOC=CENTER OF HOLE IN X)
(YLOC=CENTER OF HOLE IN Y)
(HDIA=FINISHED HOLE SIZE DIAMETER VALUE)
(HDEP=FINISHED HOLE DEPTH)
(RLVL=RETURN POINT IN Z)
(ZSTK=FINISH STOCK IN Z)
(HSTK=FINISH STOCK ON SIDE OF HOLE DIAMETER VALUE)
(ZDOC=Z NUMBER OF DEPTH OF CUTS)
(CALCULATED IN SUB PROGRAM)
(VTOFD=CUTTER RADIUS VALUE)
(VATOL=TOOL IN SPINDLE NUMBER)
(CSIZ=CALCULATED TOOL SIZE DIAMETER VALUE)
(RSIZ=TOOL SIZE PLUS FINISH STOCK)
(ADOC=EQUAL DEPTH CUTS)
(CONT=COUNTER FOR Z CUTS)
(CURX=CURRENT X LOCATION)
(CURY=CURRENT Y LOCATION)
(CURZ=CURRENT Z LOCATION)
O1001
CSIZ=[VTOFD[VATOL]*2] (CALCULATE TOOL DIAMETER)
ADOC=[[[ZSUR-HDEP]-ZSTK]/ZDOC] (ACTUAL DOC VALUE)
RSIZ=[CSIZ+HSTK] (ADD FINISH STOCK TO TOOL DIAMETER)
S=[SSPD*12]/[CSIZ*3.14159]
F=FEED
CONT=1
G0 X=XLOC Y=YLOC
G0 Z=ZSUR
CURX=XLOC CURY=YLOC CURZ=ZSUR
(ROUGH HOLE)
N1 IF [CONT GT ZDOC] GOTO N5 (TEST IF HOLE IS ROUGHED)
G03 X=[[[HDIA-RSIZ]/2]+XLOC] Y=YLOC I=[[[HDIA-RSIZ]/2]/2] Z=[CURZ-[ADOC/ZDOC]] F=FEED (ARC OUT)
CURX=[[[HDIA-RSIZ]/2]+XLOC] CURY=YLOC
G03 X=[XLOC-[CURX-XLOC]] Y=YLOC I=[XLOC-CURX] Z=[ZSUR-[ADOC*CONT]] (RAMP DOWN)
CURX=[XLOC-[CURX-XLOC]]
G03 X=CURX Y=YLOC I=[XLOC-CURX] (ROUGH AT CURRENT DEPTH)
G03 X=XLOC Y=YLOC I=[XLOC-CURX]/2 (RAMP BACK TO CENTER)
CURZ=[ZSUR-[ADOC*CONT]]
CONT=[CONT+1]
GOTO N1
(FINISH HOLE)
N5
CURX=XLOC CURY=YLOC CURZ=[[ZSUR+HDEP]+ZSTK]
G03 X=[[[HDIA-CSIZ]/2]+XLOC] Y=YLOC I=[[[HDIA-CSIZ]/2]/2] Z=CURZ (ARC OUT)
CURX=[[[HDIA-CSIZ]/2]+XLOC]
G03 X=[XLOC-[CURX-XLOC]] Y=YLOC I=[XLOC-CURX] Z=HDEP (RAMP TO FULL DEPTH)
CURX=[XLOC-[CURX-XLOC]]
G03 X=CURX Y=YLOC I=[XLOC-CURX] (FINISH DIAMETER)
G03 X=XLOC Y=YLOC I=[XLOC-CURX]/2 (RAMP BACK TO CENTER)
G0 Z=RLVL
GOTO N10
N10 RTS
%

As for the OSP5020 I don't think it's to user friendly. To edit a program you have to type in the name, but then to run it you have to type in the name again. If you make a change you have to remember to select the program again, it seems like I spend half the time just typing the program name in. Another issue is if you tell it to do a tool change to a tool that is already in the spindle it alarms out.
 
keying in prog. #s would suck. maybe the 5020 mill has issues the 5020 lathe doesn't. to select a program in edit or auto i just hit auto, program select (or edit mode, edit soft key), * (or BB0:*), write. it lists the main progs. i just cursor to the one i want & hit write. for other ext., i'll hit *.ssb or *.sdf to get a list of that type prog. the tool change thing is something i don't have to deal with using a turret. i could see the reasoning behind the alarm, but like i said, not much exp. in the mach. center dept.
hope you get the "fup" working. nice little macro.
 
Turns out the machine doesn't have user task 2 only user task, the higher math functions all come with user task 2. That's why I couldn't get the rounding to work.
 








 
Back
Top