Hello Guest it is August 09, 2022, 04:26:13 PM

Author Topic: G code G91 como incrementar  (Read 329 times)

0 Members and 1 Guest are viewing this topic.

G code G91 como incrementar
« on: March 23, 2022, 11:14:28 AM »
Good morning, I would like your help since I am no expert in GCODE. I have a client that has a CNC with two "XY" axes, in which I am modifying the siemens system for Mach4, but I came across a problem. the problem is that they need the old Gcode ISO programs to be able to carry out the work of rectifying the material by passes, checking the old HDD of the machine and having already recovered all the programs. now the question is this! how they work with XY how can I use a G code to increment a dimension for roughing. I send an example where you can see the profile of the drawing where I am using the G91 in the loop of the Subroutine but as it is a Y axis I cannot increment for the roughing. switching to the Z works best. That's why I ask if there is a variable so that, whenever you loop, increment a value in Y? I send the example, and the ISO code of the old system because it seems to me that a variable was used for this purpose. By the way, I would appreciate if someone could send me an example if possible, thank you




N1 G90 G21 G40 G17 G00 G54 G49 G80
N5S3000 M3
N6 M08 G0 X-10 Y100
N8 M98 P1000 L9
N160 G90 G40 G0 X0 Y100 F5000
N172 M05
N173 M09 M30
N9 O1000                         (sub-rotine)
N40 G0 X0.15 Y72.786
N45 G91 G01 Y-2.25          (increment Y-2.25 per pass)
N50 G90 G1 Y0.186 F7000
N60 G01 X67.15 Y-2064
N70 G3 X98.15 Y-1664 R4000.
N80 X128.15 Y-1364 R1000
N90 X154.15 Y0.136 R500.
N100 X179.15 Y3.136 R450.
M99

Offline kf2qd

*
  •  132 132
    • View Profile
Re: G code G91 como incrementar
« Reply #1 on: April 19, 2022, 07:43:19 PM »
You are going between the 2 modes, and as soon as you go back to G90 you cancel out your incremental move with you very next Y move, as G91 does not modify the work coordinates. You are mixing absolute and incremental modes in that subroutine.