Get Offset values method?
Posted: Fri Dec 18, 2020 1:29 pm
Is there a dotnet method for returning the current position that is equivalent to the values in the DROs when the KMotionCNC's Machine Coord checkbox is unchecked?
Discuss KFLOP, Kanalog etc. here
https://dynomotion.com/forum/
Code: Select all
// Get Absolute Machine Coordinates and convert to GCode Coordinates
double x=0, y=0, z=0, a=0, b=0, c=0;
KM.CoordMotion.UpdateCurrentPositionsABS(ref x, ref y, ref z, ref a, ref b, ref c, false);
double xg = KM.CoordMotion.Interpreter.ConvertAbsToUserUnitsX(x);
double yg = KM.CoordMotion.Interpreter.ConvertAbsToUserUnitsY(y);
double zg = KM.CoordMotion.Interpreter.ConvertAbsToUserUnitsZ(z);
double ag = KM.CoordMotion.Interpreter.ConvertAbsToUserUnitsA(a);
double bg = KM.CoordMotion.Interpreter.ConvertAbsToUserUnitsB(b);
double cg = KM.CoordMotion.Interpreter.ConvertAbsToUserUnitsC(b);