Manual Guide for Lathe Programming manual Page 176 of 524 | Fanuc CNC
Manual Guide for Lathe Programming manual Page 176
N360 WORK_SET = ATAN[COFI_A]/[1];
IF[#21821 EQ 1 ]THEN
#21821 = 0 /* flag clear
WORK_X = COFI_A*[#5042-RN_DZ]+COFI_B
COFI_BO=COFI_B /* SAVE FIRST B
WORK_XO=WORK_X /* SAVE FIRST CROSS POINT X
N402 RMV_DIR = 1
IF[[[#5041-RN_DX]*WORK_D]-WORK_X GE #21823 ||ABS[[[#5041-RN_DX]*WORK_D]-WORK_X] LT #21823]THEN; /* at
N404 IF [LINE_KID EQ 2] THEN;
#21824 = RN * SQRT[COFI_A*COFI_A + 1]
N410 IF [RMV_DIR GT 0] THEN #21824 = -#21824
#21825 = COFI_B + #21824
N420 #21827 = RN_DZ /* TIP
#21826 = #21825 + RN_DX *WORK_D /* TIP X
N430 COFI_B = -[COFI_A*#21827]+#21826;
CROS_Z = -[COFI_B/[1/COFI_A+COFI_A]] ;
N440 VERT_LEN = SQRT[CROS_X*CROS_X+CROS_Z*CROS_Z]*W_MUDV
IF [ROUND[ABS[CROS_Z]*#21822]/#21822 LT #21823] THEN;
#21821 = 1 /* flag
N450 GOTO 5 /* through 0 point
WORK_X = COFI_A*#5042+COFI_B
/* OLD LINE (CUTTING LINE and CENTER OF TOOL)
N460 IF [ABS[COFI_A] LT #21823 || COFI_A GT #21823]GOTO 462 /* A>=0 ?
GOTO 466 /* A<0
N462 IF [ABS[COFI_BO] LT #21823 || COFI_BO GT #21823] THEN /*B>=0
IF [ABS[COFI_BO] LT #21823 && COFI_B LT #21823]GOTO 395/* BO=0 & B<0
IF [ROUND[ABS[COFI_BO]*#21822]/#21822 LT #21823]GOTO 464 /* BO=0 ?
IF [ROUND[ABS[COFI_B]*#21822]/#21822 LT #21823]GOTO 464 /* B=0
/* REGION 1
N464 IF [ABS[COFI_BO] LT #21823 || COFI_BO LT #21823] THEN /*B<=0