I'm setting up a 4th Axis and looking to optimise the G0 movements. Gantry CNC with stepper controller 4th rotary.
I'm not sure if the "Ang Short Rot on G0" will help when G1 commands exceed the 0 to 360 movements.
GCODE example...
% (F_CONTOUR12_T1A.TAP)
% MILL_TURN_PART_TRIAL -----------------------------------------
N5 G17
N10 G21 G40 G49
N15 G53 G50 G90 G94
N20 M48
N25 G54
N30 S6000 M3
N35 G0 Z22.
N40 G0 A0.
N45 (-------------------------)
N50 (F-CONTOUR12-T1A - PROFILE)
N55 (-------------------------)
N60 G0 X18.064 Y55.325 Z22.
N65 G0 A270.
N70 G0 Z19.5
N75 G1 Z14.5 F100
N80 G1 A630. F3985
N85 G0 Z22.
N90 G0 A270.
N95 G0
N100 G0 Z16.5
N105 G1 Z11.5 F100
N110 G1 A630. F3985
N115 G0 Z22.
%--------------------------------
N120 G0 Z22
N125 M5
N130 M9
N135 G40 G49 G80
N140 M30
%
The issue with this example, is that with "Ang Short Rot on G0" ticked... the A630 commands are completely ignored. It has to be with 0 to 360.
It does this with or without "Rot 360 rolloever" ticked.
The post-processor is kicking out this code, and it's getting difficult to figure out how to optimise it there. But currently this type of code is causing excessive rotations. If I did a 10 turn spiral slot with two passes, the rotary is going to unwind 10 turns at the end of the first pass before starting the second.
The only other way I can think of is to implement a function in the gcode using G92. For example, for a G0 command it would first G92 mod(A current position / 360)*260, then G0 to new location. This won't provide shortest path though, unless I get more complicated with maintaining a variable for the rotarys position (getting messy).
What I believe would be needed...
G0 shortest path followed by a DRO update for 0 to 360 position.
G1 commands function without angle wrapping or any modification to DRO position.
So feed commands function exactly as intended, however G0 rapids via shortest path and resets the DRO to the 0 to 360 range, ready for the next procedure.
Do I have my logic correct, or have I misunderstood how this could be implemented?
Otherwise, would it be possible to somehow setup a gcode command to turn on and off the "Ang Short Rot on G0". This would enable me to turn it on, G0 to next position by shortest path, G92 to restore the DRO to where it would have been given unwinding, then turn the "Ang Short Rot on G0" function off. I could easily add this on/off to the G0 rapids in the post-processor and all would be neatly solved :-)
Would appreciate any comments.