# Thread: fagor programming problem

1. ## fagor programming problem

I am new to fagor programming and at my new job this is all they run, i am trying to cut grooves around a drum roller on a helix. it works fine for about 45 degrees and then it reverses the helix and im unsure why.... any help would be great.

(P100=270) ;PART DIA
(P101=-565) ;PART LENGTH
(P102=280) ;NUMBER OF GROOVES
(P103=-1.215) ;DEPTH OF CUT
(P104=8.5) ;DEGREES OF HELIX
(P105=350) ;CUTTING FEED
(P106=5) ;SAFETY POSITION
(P107=360) ;ANGLE OF GROOVES R CUT IN D
(P108=P107/P102) ;GROOVE INCREMENT
(P109=0) ;A START POINT
(P110=P104) ;A FINISH POINT
(P111=-70) ;A FINISH POINT COUNT
(P112=-71) ;A START POINT COUNT
(P113=P108*P111) ;A START POINT CALC
G4
;
G17
X0A0
G16 X A
N19;
;------TEST 1 START
; FIRST LINE
G02 M03
G01 ZP103 FP105 ;CUT DEPTH
G4
;
(P113=P108*P111) ;CALC
(P110=P104) ;A END POINT CALC
;
G01 XP101 AP110 FP105 ; X & A END POINT
G01 ZP106 FP105 ; Z MOVE UP
G04
;
(P109=P108*P112) ;CALC A START
;
G0 X0 AP109 FP105 ;MOVE TO NEXT
;
(P111=P111+1)
(P112=P112+1)
(IF P111 EQ P102 GOTO N30) ; FINISH CYCLE
;
(GOTO N10) ;GOTO START
;
N30;
M30

2. Basically you want to cut a thread, right? Using a 4th axis on a 3 axis mill, right? You need start angle and pitch and total length. If your total length is -565 and your pitch is 8.5 and your start angle is 0 and Z zero center of part, your start point is X0. Z135. A0. and your finish point is X-565. Z135. A23929.4124. X advances 8.5 per revolution. It takes 66.47059 revolutions to travel 565. 66.47059 times 360 degrees is 23929.4124. Does your A axis have travel/max angle limits?

3. Not really a thread, from my zero point to -565 I want the groove to spiral only 20mm. There is no limit on my a axis.

4. Originally Posted by PBSF
I am new to fagor programming and at my new job this is all they run, i am trying to cut grooves around a drum roller on a helix. it works fine for about 45 degrees and then it reverses the helix and im unsure why.... any help would be great....
Looking at the code, to me the first groove is cut at A-91.2857degs [(P109=P108*P112) ;CALC A START]. This then increments in steps of 1.2857deg. At the 71st groove this equals 0deg. 70 grooves = 45deg.
I think this is where the A axis reverses when the numbers change from negative to positive.

5. Which line is N10?

Originally Posted by PBSF
I am new to fagor programming and at my new job this is all they run, i am trying to cut grooves around a drum roller on a helix. it works fine for about 45 degrees and then it reverses the helix and im unsure why.... any help would be great.

(P100=270) ;PART DIA
(P101=-565) ;PART LENGTH
(P102=280) ;NUMBER OF GROOVES
(P103=-1.215) ;DEPTH OF CUT
(P104=8.5) ;DEGREES OF HELIX
(P105=350) ;CUTTING FEED
(P106=5) ;SAFETY POSITION
(P107=360) ;ANGLE OF GROOVES R CUT IN D
(P108=P107/P102) ;GROOVE INCREMENT
(P109=0) ;A START POINT
(P110=P104) ;A FINISH POINT
(P111=-70) ;A FINISH POINT COUNT
(P112=-71) ;A START POINT COUNT
(P113=P108*P111) ;A START POINT CALC
G4
;
G17
X0A0
G16 X A
N19;
;------TEST 1 START
; FIRST LINE
G02 M03
G01 ZP103 FP105 ;CUT DEPTH
G4
;
(P113=P108*P111) ;CALC
(P110=P104) ;A END POINT CALC
;
G01 XP101 AP110 FP105 ; X & A END POINT
G01 ZP106 FP105 ; Z MOVE UP
G04
;
(P109=P108*P112) ;CALC A START
;
G0 X0 AP109 FP105 ;MOVE TO NEXT
;
(P111=P111+1)
(P112=P112+1)
(IF P111 EQ P102 GOTO N30) ; FINISH CYCLE
;
(GOTO N10) ;GOTO START
;
N30;
M30

6. Originally Posted by PBSF
... it works fine for about 45 degrees and then it reverses the helix and im unsure why.... any help would be great....
Are you still needing help, or did you solve your problem?

7. Originally Posted by PBSF
I am new to fagor programming .... any help would be great...
Was your problem a Fagor error or was it your program?

8. Originally Posted by Kiwi
Was your problem a Fagor error or was it your program?
Bump.....Was your problem a Fagor error or was it your program??

9. Originally Posted by Kiwi
Bump.....Was your problem a Fagor error or was it your program??
Bump.Bump....Was your problem a Fagor error or was it your program???

10. Originally Posted by Kiwi
Bump.Bump....Was your problem a Fagor error or was it your program???
I think you're whipping a dead horse Kiwi. It seems to happens a lot; the OP asks a question and then doesn't bother to come back say if a resolve was found or not.

Regards,

Bill

11. Originally Posted by angelw
I think you're whipping a dead horse Kiwi. It seems to happens a lot; the OP asks a question and then doesn't bother to come back say if a resolve was found or not...
I agree, a dead something. I wonder why we bother sometimes.
It's always nice to hear when there's a good outcome and we all learn from the experience.