I'm using G92 global offset and would like to set it programatically (that is, outside of using GCode G91 x y z). If the global offset for G92 is considered the 0 index of the Interpreter.SetOrigin() method, setting the G92 global offset be:
Interpreter.SetOrigin(0,x,y,z,a,b,c)
Does this function actually *sets* the offset from the machine location, or does it add an offset to any already existing offset?
The reason I ask is that, if it truly 'sets', I should be able to 'reset' the G92 global offset by using SetOrigin(0,0,0,0,0,0,0). If it adds to the existing offset, that would have no effect and I would need a method of resetting the offset to zeroes.
G92 set and reset options
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: G92 set and reset options
Hi Sam,
KM.CoordMotion.Interpreter.SetupParams.X_AxisOffset = 0;
KM.CoordMotion.Interpreter.SetupParams.Y_AxisOffset = 0;
KM.CoordMotion.Interpreter.SetupParams.Z_AxisOffset = 0;
etc
It 'sets' the offsets. But it only changes the GCode Vars 5211... The active Axis Offsets also need to be updated with:nterpreter.SetOrigin(0,x,y,z,a,b,c)
Does this function actually *sets* the offset from the machine location, or does it add an offset to any already existing offset?
The reason I ask is that, if it truly 'sets', I should be able to 'reset' the G92 global offset by using SetOrigin(0,0,0,0,0,0,0). If it adds to the existing offset, that would have no effect and I would need a method of resetting the offset to zeroes.
KM.CoordMotion.Interpreter.SetupParams.X_AxisOffset = 0;
KM.CoordMotion.Interpreter.SetupParams.Y_AxisOffset = 0;
KM.CoordMotion.Interpreter.SetupParams.Z_AxisOffset = 0;
etc
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 85
- Joined: Fri Apr 27, 2018 12:44 pm
Re: G92 set and reset options
Thank you, Tom. I'll have to explore that a bit more.
-
- Posts: 85
- Joined: Fri Apr 27, 2018 12:44 pm
Re: G92 set and reset options
After exploring this a bit, I've decided that it makes more sense (for me) to utilize G52 codes instead of G92 as it is easier to reset from a GCode standpoint. Thank you.