Hi
Maybe you will understand better if I give you a snippet of the code in the wizard.
Think the problem is how I implement the sub routine.
?
DRO values get filled in by the user.
Sub Main()
DoOEMButton (169)
CTubeDia = GetOEMDRO(1050)
UCTubeDia1 = GetOEMDRO(1051)
TThickness = GetOEMDRO(1052)
JAngle1 = GetOEMDRO(1053)
OD = GetOEMDRO(1050)
ID = 0
RO = (CTubeDia / 2)
RU = (UCTubeDia1 / 2)
RI = (RO - TThickness)
AF = JAngle1
AStepDeg = 2
Feed = (GetOEMDRO(1054))
OpenTeachFile "PipeCope.nc"
Code"G40 G54 G90 G49 G17 G50 G64 G91.1 G94"
Code"G0 A" & 0.000
Code"G0 X" & 0.000
Code"F" & Feed
Code"M98 P1000 L180"
Code "G0 A" & 0.000
Code "G0 X" & 0.000
Code"M30"
Code "O1000"
Code "G1 A" & AStepDeg
Code "G1 X" & (Sqr(RO^2 - ( (RI * Sin (ID))^2)) / Sin(JAngle1) - Tan (90-JAngle1) * RI * Cos(ID))
ID = (ID + 2)
AStepDeg = (AStepDeg + 2)
Code "M99"
Code "M30"
Code "%"
CloseTeachFile
Call LoadTeachFile
End Sub
Main
Any help will be appreciated.
Thanks
Deon