- Posts: 592
- Thank you received: 0
Incremental g10 possible?
7 years 7 months ago #127473
by Leon82
Incremental g10 possible? was created by Leon82
Is there a way to make an incremental g10 offset?
I don't see anything in the gcode reference. For example on a fanuc g90g10 will set the absolute value but g91g10 would add the value to the current. Like a +input.
I don't see anything in the gcode reference. For example on a fanuc g90g10 will set the absolute value but g91g10 would add the value to the current. Like a +input.
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
7 years 7 months ago #127475
by Todd Zuercher
Replied by Todd Zuercher on topic Incremental g10 possible?
No it does not. Unfortunately I would have found use for it on occasion. I've worked around the deficiency using some parameters and expressions.
Please Log in to join the conversation.
7 years 7 months ago #127495
by pl7i92
Replied by pl7i92 on topic Incremental g10 possible?
it is better to stay on the Real numbers then offsets
as you can realy get in trouble
as you can realy get in trouble
Please Log in to join the conversation.
7 years 7 months ago #127532
by MaHa
Replied by MaHa on topic Incremental g10 possible?
No one else willing, to bring an example?
This simple one-liner can be used as a subroutine. I think it’s the safest way, don’t have to touch the calculation, except for extending.
The first parameter is the coordinate system number, parameter 2,3,4 are the values for X, Y, Z, to shift the selected coordinate system.
Input zero to keep actual value. All parameter must be set, because no safety check in the sub.
to call:
o<incr_g10> call [1][4][-10][0]
o<incr_g10> sub
G10 L2 P#1 X[#[5201 + [#1 * 20]] + #2] Y[#[5202 + [#1 * 20]] + #3] Z[#[5203 + [#1 * 20]] + #4]
o<incr_g10> endsub
M2
This simple one-liner can be used as a subroutine. I think it’s the safest way, don’t have to touch the calculation, except for extending.
The first parameter is the coordinate system number, parameter 2,3,4 are the values for X, Y, Z, to shift the selected coordinate system.
Input zero to keep actual value. All parameter must be set, because no safety check in the sub.
to call:
o<incr_g10> call [1][4][-10][0]
o<incr_g10> sub
G10 L2 P#1 X[#[5201 + [#1 * 20]] + #2] Y[#[5202 + [#1 * 20]] + #3] Z[#[5203 + [#1 * 20]] + #4]
o<incr_g10> endsub
M2
Please Log in to join the conversation.
7 years 7 months ago #127537
by Leon82
Replied by Leon82 on topic Incremental g10 possible?
Thanks,
I'll play around with it.
I'll play around with it.
Please Log in to join the conversation.
7 years 7 months ago #127557
by Leon82
Replied by Leon82 on topic Incremental g10 possible?
Is there a list of all the variables? I'll look in the wiki again but I didn't see it
Please Log in to join the conversation.
7 years 7 months ago #127558
by MaHa
Replied by MaHa on topic Incremental g10 possible?
The table 2 with parameter, coordinate system. As you can see, cs1 X is #5221, cs2 X is 5241 etc. That is why begin is at 5201 and the multiplier cs x 20 added. #1 to #4 are the parameter from the calling routine.
linuxcnc.org/docs/2.7/html/gcode/g-code.html#gcode:g54-g59.3
linuxcnc.org/docs/2.7/html/gcode/g-code.html#gcode:g54-g59.3
Please Log in to join the conversation.
7 years 7 months ago #127559
by Leon82
Thanks, do you happen to know the variables for the tool offsets? Or are they just stored in the tool table file m
Replied by Leon82 on topic Incremental g10 possible?
MaHa wrote: The table 2 with parameter, coordinate system. As you can see, cs1 X is #5221, cs2 X is 5241 etc. That is why begin is at 5201 and the multiplier cs x 20 added. #1 to #4 are the parameter from the calling routine.
linuxcnc.org/docs/2.7/html/gcode/g-code.html#gcode:g54-g59.3
Thanks, do you happen to know the variables for the tool offsets? Or are they just stored in the tool table file m
Please Log in to join the conversation.
7 years 7 months ago #127568
by pl7i92
Replied by pl7i92 on topic Incremental g10 possible?
you may keep in mind that the parameters are not updated in all situation
at the set time so interpreter may override
at the set time so interpreter may override
Please Log in to join the conversation.
7 years 7 months ago #127583
by MaHa
Replied by MaHa on topic Incremental g10 possible?
Maybe #5403 and #5410, length and diameter of loaded tool are interresting. I never found out how to read data from a not loaded tool.
linuxcnc.org/docs/2.7/html/gcode/overvie...:numbered-parameters
I use this type of routines for a long time for toolset, touchprobe and other, like my old spiralroutine with polarcoordinates, only working from X0 Y0. So offset had to be moved for each operation. I am not a friend of G92, so this is the only way for me.
I agree, preview does not update, and it looks a bit strange having the plot far from preview. But it always running rocksolid. (As long you dont try to reload with axis-remote -r while running program...)
linuxcnc.org/docs/2.7/html/gcode/overvie...:numbered-parameters
I use this type of routines for a long time for toolset, touchprobe and other, like my old spiralroutine with polarcoordinates, only working from X0 Y0. So offset had to be moved for each operation. I am not a friend of G92, so this is the only way for me.
I agree, preview does not update, and it looks a bit strange having the plot far from preview. But it always running rocksolid. (As long you dont try to reload with axis-remote -r while running program...)
Please Log in to join the conversation.
Time to create page: 0.106 seconds
