Good Day all!!!!!!
Any one out there writing parametric programs for OSAI control? I have writen several other porgrams for our other routers NUM control (using Xilog and Alpha-Cam on an SCM router), no problems. We are using Alpha-cam/Alpha-edit and a Onsrud 5 axis router.
I am having problems using and identifying varibals. I have written a very simple program to produce a rectangle.......
;(02 SEP 09)
;FILENAME TEST
;MACHINE CONFIGURATION = 0, 0, 125., 1, 1, 0, 0, 1, 0, 1
;(ESTIMATED CYCLE TIME = 0MINS 17SECS)
;(TOOL=01, NAME=1-2 ROUGHING, DIAMETER=0.5)
;(MACHINING TIME = 0 MINUTES 17 SECONDS)
(INP,"HEIGHT_IN_Y",20,E40)
(INP,"WIDTH_IN_X_",20,E41)
G27
G90
G80
G40
;ALL POP UP PINS DOWM
M360
G00 G79 Z(@ZPARKP1)
G00 A0 C0
;VACUUM ON
;ADD SEMI COLON FOR NON-EXECUTION OF BLOCK
;REMOVE SEMI COLON FOR EXECUTION OF BLOCK
M131
;M132
;M133
(UAO,1)
(UIO,Z0.75)
M06 T1.109
M03 S18000
G00 X0.0 Y-0.75
Z0.5
G41
G00 Z0.25
G01 Z-0.75 F75.0
Y-0.25 F400.0
YE40
XE41
Y0.0
X-0.25
X-0.75
G00 Z0.5
G40
G00 G79 Z(@ZPARKP1)
;VACUUM OFF ALL ZONES
;M140
M05
(UIO,Z-0.75)
M30
this works fine but when I get into more complexed programming as listed below I get into trouble.
;(03 SEP 09)
;FILENAME AV LIP
;MACHINE CONFIGURATION = 0, 0, 125., 1, 1, 0, 0, 1, 0, 1
;(ESTIMATED CYCLE TIME = 0MINS 40SECS)
;(TOOL=01, NAME=1-2 ROUGHING, DIAMETER=0.5)
;(TOOL=02, NAME=1-2 SPIRAL, DIAMETER=0.5)
;(MACHINING TIME = 0 MINUTES 40 SECONDS)
(INP,"ROUGH_WIDTH____",20,E40)
(INP,"FINISHED_WIDTH_",20,E41)
(INP,"ROUGH_HEIGHT___",20,E42)
(INP,"FINISHED_HEIGHT",20,E43)
(INP,"RISE___________",20,E44)
(INP,"WIDTH_OF_FOOT__",20,E45)
E46=(((0.5*E41-E45)SQR)+E44SQR)/(2*E44);RADIUS
G70
G27
G90
G80
G40
;ALL POP UP PINS DOWM
M360
G00 G79 Z(@ZPARKP1)
G00 A0 C0
;VACUUM ON
;ADD SEMI COLON FOR NON-EXECUTION OF BLOCK
;REMOVE SEMI COLON FOR EXECUTION OF BLOCK
M131
;M132
;M133
(UAO,1)
(UIO,Z0.8125)
M06 T1.109
M03 S18000
G00 XE45+.125 YE42+.0625
Z0.5
G41
G00 Z0.25
G01 Z-0.8125 F75.0
G03 X(E40-E45)-.0625 RE46-.0625 F200.0
G00 Z0.5
G40
G00
M05
M06 T2.104
M03 S18000
G00 X-.5 YE42
Z0.5
G41
G00 Z0.25
G01 Z-0.8125 F75.0
G01 X0+((E40-E41)/2)
YE43-.02 F300.0
G02 X((E40-E41)/2)+.02 YE43+((E42-E43)/2) R.02
G01 XE45+((E40-E41)/2)
G03 X((E40-E41)/2)+(E41-E45) RE46
G01 X(E41+((E40-E41)/2))-.02
G02 XE41+((E40-E41)/2) Y((E42-E43)/2)+(E43-.02) R.02
G01 Y((E42-E43)/2)+.02
G02 X((E40-E41)/2)+(E41-.02) Y((E42-E43)/2) R.02
G01 X((E40-E41)/2)+.02
G02 X((E40-E41)/2) Y((E42-E43)/2)+.02 R.02
G01 YE43+.5
G00 Z0.5
G40
G00 G79 Z(@ZPARKP1)
;VACUUM OFF ALL ZONES
;M140
M05
(UIO,Z-0.8125)
M30
any ideas????
thanks,
jweinhold
jweinhold
You need more () it will not do the math corect other wise.
E46=(((0.5*E41-E45)SQR)+E44SQR)/(2*E44);RADIUS
E46=(((0.5*(E41-E45)SQR)+(E44SQR)/2*E44)
On moves all math must be in ()
G03 X(E40-E45)-.0625 RE46-.0625 F200.0
G03 X((E40-E45)-.0625) R(E46-.0625) F200.0.
GOOD LUCK
jlind