bert4255
Plastic
- Joined
- Jul 9, 2010
- Location
- rochester,ny
I'm trying to modify my post for a anilam 4200t cnc and when i post a program to do threads it gives me this
*TOOL #4 THREADING TOOL
T4
M41
G97 S600
G0 X1.17 Z.0575 M3
M8
G83 E0.0312 Z0.62 C0.01 D0.027 A60 S2
G0 X2. Z-.5625
G0 Z.1
M5
M2
I need the E to give me threads per inch instead of the decimal it is giving me.
If anyone could look at my post and tell me what i need to change to fix it I'd be greatful.
here is my post
2002. Program Block 2. Thread
PI = 3.141592653589793
ZLENGTH = LATHE_GetProfileStartZ() - LATHE_GetProfileEndZ()
XTAPER = LATHE_GetProfileStartX() - LATHE_GetProfileEndX()
LEAD = round(LATHE_GetThreadLead(), 4)
FIRSTPASS = LATHE_GetThreadFirstCut()
TDEPTH = cos((LATHE_GetAngleIn() / 2) * PI / 180) * LEAD
TANGLE = LATHE_GetAngleIn()
SKIMS = LATHE_GetFinishNumberOfCuts()
ZRETRACT = LATHE_GetRoughRetractAmount()
STARTS = 1
OUTSTRING = "'G83',"
OUTSTRING = OUTSTRING&"'E"&LEAD&"'"
OUTSTRING = OUTSTRING&"'Z"&Round(ZLENGTH, 4)&"'"
OUTSTRING = OUTSTRING&"'C"&Round(FIRSTPASS, 4)&"'"
OUTSTRING = OUTSTRING&"'D"&Round(TDEPTH, 4)&"'"
OUTSTRING = OUTSTRING&"'A"&Round(TANGLE, 4)&"'"
If SKIMS > 1 Then
OUTSTRING = OUTSTRING&"'S"&SKIMS&"'"
End If
OUTSTRING = OUTSTRING&"'R"&Round(ZRETRACT, 4)&"'"
OUTSTRING = OUTSTRING&"'X"&Round(XTAPER, 4)&"'"
OUTSTRING = OUTSTRING&"'W"&STARTS&"'"
CALL LATHE_ProcessPostLine(OUTSTRING)
*TOOL #4 THREADING TOOL
T4
M41
G97 S600
G0 X1.17 Z.0575 M3
M8
G83 E0.0312 Z0.62 C0.01 D0.027 A60 S2
G0 X2. Z-.5625
G0 Z.1
M5
M2
I need the E to give me threads per inch instead of the decimal it is giving me.
If anyone could look at my post and tell me what i need to change to fix it I'd be greatful.
here is my post
2002. Program Block 2. Thread
PI = 3.141592653589793
ZLENGTH = LATHE_GetProfileStartZ() - LATHE_GetProfileEndZ()
XTAPER = LATHE_GetProfileStartX() - LATHE_GetProfileEndX()
LEAD = round(LATHE_GetThreadLead(), 4)
FIRSTPASS = LATHE_GetThreadFirstCut()
TDEPTH = cos((LATHE_GetAngleIn() / 2) * PI / 180) * LEAD
TANGLE = LATHE_GetAngleIn()
SKIMS = LATHE_GetFinishNumberOfCuts()
ZRETRACT = LATHE_GetRoughRetractAmount()
STARTS = 1
OUTSTRING = "'G83',"
OUTSTRING = OUTSTRING&"'E"&LEAD&"'"
OUTSTRING = OUTSTRING&"'Z"&Round(ZLENGTH, 4)&"'"
OUTSTRING = OUTSTRING&"'C"&Round(FIRSTPASS, 4)&"'"
OUTSTRING = OUTSTRING&"'D"&Round(TDEPTH, 4)&"'"
OUTSTRING = OUTSTRING&"'A"&Round(TANGLE, 4)&"'"
If SKIMS > 1 Then
OUTSTRING = OUTSTRING&"'S"&SKIMS&"'"
End If
OUTSTRING = OUTSTRING&"'R"&Round(ZRETRACT, 4)&"'"
OUTSTRING = OUTSTRING&"'X"&Round(XTAPER, 4)&"'"
OUTSTRING = OUTSTRING&"'W"&STARTS&"'"
CALL LATHE_ProcessPostLine(OUTSTRING)