Try on a start write G94 - feed per minute.
Long timelurker, first time poster, as I have a pretty specific problem.
i moved this thread to the correct sub forum. question remains the same.
Im writinga general warmup program to use in multiple Fanuc CNC mills, using G-code. My programlooks as follows:
Now my problem currently is that my machine uses the traverse rate instead of the feedrate in te 'main loop'. Does anyone know what I’m doing wrong?Code:% O1111 (REV 0) (EDITEDBY JVE) (DATE26-08-16) (WARMUP) (---------------------------------) N1 G0G28G91Z0 G40G49G80G90 (---INITIALIZE---) M6T1 #901=0(COUNTER) #902=1(LIM 1) #903=3(LIM 2) #904=5(LIM 3) #909=#902(LIMIT) #911=1000(RPMSTARTVALUE) #912=4000(FEEDSTARTVALUE) GOTO20 (-------------------) (-----CTRLLOOP-----) N10 #911=#911*2 IF[#911GT1000]THEN#909=#903 IF[#911GT8000]THEN#909=#904 #912=#912*2 #901=0 (-------------------) (-----MAINLOOP-----) N20 #901=#901+1 M102(CLOSECLAMPS) S#911M3 F#912 G4X1. G90G1G53X700. G1G53Y-300. G1G53X0 G1G53Y0 M112(OPENCLAMPS) G4X1. IF[#901LT#909]GOTO20 IF[#911GT20000]GOTO1(FULLLOOP) GOTO10 (-------------------) M30 %
Similar Threads:
Try on a start write G94 - feed per minute.
Postprocessors, VBA macros, .NET programming.
www.ccsoftcz.com
i tried this, inserin G94 into the line, above it and putting it at the top of the program. none had any effect. i also tried the same program on a different machine of the same make and model, which yielded the same results.
its almost like i cant use G1 with macros in G53 or something. i just can't figure it out.
I don't know about your controller but on mine (Fanuc) #912=4000 would be interpreted to mean G1 F4000.0. On our Fanucs there seems to be an odd mix about "back filling" and decimal points.
Try putting a decimal in your #912 value or start out with a smaller number.
~aj
i tried, manually, putting macro #912 to: 1000.000, 100.000, 10.000, 1.000 and 0.100. none of these values have any difference in the speed at which the axis move.
Just spit-ballin' here, but maybe try putting the F#912 variable on the same line as the G1? Maybe your controller isn't picking it up because it's on it's own line and the controller's not reading it when it reads the G1?
already tried that, i even tried putting it on every line with a linear movement
A read of the operator's manual infers that G53 is done at rapid rate
- a rethink is required....maybe use G59 co-ord system ?
try this ver. ( laid out a little differently)Code:[% O1111 ( WARMUP ) ..... this whole line comes up on your "dir listing" (REV E) (EDITED BY JVE) (DATE 26-08-16) (WARMUP) (---------------------------------) G0 G40 G49 G80 G90 G94 (Safety code) G53 Z0. ( Z home) G53 X0. Y0. ( X Y Home ) G59 ( switch to rarely used work co-ord ) G92 X0. Y0. Z0. ( Set current position to zero )...in case G59 contains values....check if it works M6 T1 N1 (---INITIALIZE---) #901=0 (COUNTER) #902=1 (LIM 1) #903=3 (LIM 2) #904=5 (LIM 3) #909=#902 (LIMIT) #911=1000 (RPMSTARTVALUE) #912=4000 (FEEDSTARTVALUE) GOTO20 (-------------------) N10 (-----CTRL LOOP-----) #911=#911*2 IF [ #911 GT 1000 ] THEN #909=#903 IF [ #911 GT 8000 ] THEN #909=#904 #912=#912*2 #901=0 (-------------------) N20 (-----MAIN LOOP-----) M102 (CLOSE CLAMPS) S#911 M3 G90 G1 F#912 G4 X1. X700. Y-300. X0. Y0. M112 (OPEN CLAMPS) G4 X1. #901=#901+1 ( your count should increase after it does the cycle) IF [ #901 LT #909 ] GOTO20 IF [ #911 GT 20000 ] GOTO30 (FULL LOOP) .... you sure you want to restart back at the beginning again ? ... maybe go to N30 end ? GOTO10 N30 (------END-------) M30 %
Hello Superman,
Using G59 or any of the G54.1Px, is not an option, as we swap around a lot of jigs and need most of the work co-ordinates. that’s why I chose G53, I can't use any of the work co-ords, for fear of inadvertently overwriting a used one.
What about using incremental moves, from the XYZ home point
Code:[% O1111 ( WARMUP ) ..... this whole line comes up on your "dir listing" ( ) ( REV E) ( EDITED BY JVE ) ( DATE 26-08-2016 ) ( ) G0 G40 G49 G80 G90 G94 ( SAFETY CODES ) G53 Z0. ( Z HOME ) G53 X0. Y0. ( X Y HOME ) M6 T1 ( this line may be better after safety codes, as a carousel TC may not return to Z home ) ( ) N1 (---INITIALIZE---) #901=0 (COUNTER) #902=1 (LIM 1) #903=3 (LIM 2) #904=5 (LIM 3) #909=#902 (LIMIT) #911=1000 (RPMSTARTVALUE) #912=4000 (FEEDSTARTVALUE) GOTO20 () N10 (-----CTRL LOOP-----) #911=#911*2 IF [ #911 GT 1000 ] THEN #909=#903 IF [ #911 GT 8000 ] THEN #909=#904 #912=#912*2 #901=0 () N20 (-----MAIN LOOP-----) M102 (CLOSE CLAMPS) G4 X1. S#911 M3 G91 G1 X700. F#912 Y-300. X-700. Y300. G90 M112 (OPEN CLAMPS) G4 X1. #901=#901+1 ( your count should increase after it does the cycle) IF [ #901 LT #909 ] GOTO20 IF [ #911 GT 20000 ] GOTO30 ( FINISHED ) .... you sure you want to restart back at the beginning again ? ... maybe go to N30 end ? GOTO10 () N30 (------END-------) M30 %
We are thinking the same way, because i thought exactly the same thing. I sent the tool home in G53X0Y0Z0. then just used G54 with incremental movements. Yet it still used the traverse rate.
You could leave the G54 out of the program altogether.
Is DRN ( dry run) turned ON ?
which override ( Rapid / Feed ) switch can be used to control the rate of movement ?
Did you use the feed per minute G code (G94), not feed / REV (G95) ? ,.....G95 would make it very fast in G1 mode
Use single step, & go thru the program, verify to see that the codes are actually being read & the control displays the code accordingly
Last edited by Superman; 08-31-2016 at 05:02 AM.
Did you find a work around to this problem. I was thinking you could save the work offsets to unused variables. Then replace them when you don't want to run the warmup program anymore.
On my control I can use a G50.6 to override the feedrate control, rapid or otherwise. If your machines have this functionality then you could just limit the rapid and have it reset at the end of the program. In my case I am pretty sure that value is reset to 100% on program end, reset, etc.
Also, Needshave is correct. Can have the warmup program record the current offset registers, overwrite them for the purpose of the warmup and then input the recorded values at program end, or manually if the program is stopped prematurely. Or, can even have the warmup program read the current offset registers, leave them as is and compensate for them automatically from within the program so stopping early would not be a problem either.
Last edited by Mhoppe; 10-11-2016 at 11:46 PM.
On my Fanuc 0i controlled machine, G53 is inherently commanded as G0.
I could command
G1 A-13. F100.
G53 A0
and my machine will feed to A-13. at 100 IPM, then rapid to A0 even though G1 is still modal if you look at the modal G codes after the G53 line finishes.
A work around could be:
read the current values for G59 and set a flag, set current G59 values to temporary variables, set G59 values to 0, execute warmup program, when finished, restore previous values
on a Fanuc, this could be something like
IF[#810EQ1.234]GOTO1234 (skip if already 0)
#800=#(Variable for G59 X value);
#801=#(Variable for G59 Y value);
#802=#(Variable for G59 Z value);
#(G59 X variable)=0
#(G59 Y variable)=0
#(G59 Z variable)=0
#810=1.234 (set flag so values are not overwritten with 0)
N1234
(execute warmup program)
#(G59 X variable)=#800 (reset G59 to previous values)
#(G59 Y variable)=#801
#(G59 Z variable)=#802
#810=0 (reset flag after successful completion of program)
M30
Or did you find another work around?
CNC Product Manager / Training Consultant