209
« on: January 15, 2007, 07:08:28 AM »
Sorry for the slow response, I've been away on holidays.
BTW, it would be used for a cut off machine.
I was thinking of having a program much like below, is it possible to have it attached to a button?
e.g when I push the button with 20mm on it, it will run the below program?
e.g when I push the button with 16mm on it, it will run the below program but with 16.0 in the variable #1?
;Y0.0 is always the centerline of the bar of steel
#1=20.0 ;Variable Bar Ø
#2=[#1/2]
G90 G55 G21
G00 Y[#2+1.0] ;Rapid into 1.0 away from job
G01 Y[#2-[#2*2]-1.0] F300 ;Cuts in to -11.0 (½Ø + 1.0 further)
G00 Y300.0 ;Pulls away from the job
M30
If the answer is no, please feel free to explain how I would go about using VB scripts instead.
Thanks.
Darc