I just realised I meant to add that I was testing in KMotionCNC, and it doesn't issue any kind of warning when you use duplicate tool IDs.
G-codes/offsets/tools with .Net
Moderators: TomKerekes, dynomotion
Re: G-codes/offsets/tools with .Net
Thanks for clarifying that Tom.
Re: G-codes/offsets/tools with .Net
And I've just realised I don't need to generate a dedicated tool file.
However, if I use SetTool/GetTool functions, how do you delete a tool from the interpreter?
However, if I use SetTool/GetTool functions, how do you delete a tool from the interpreter?
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: G-codes/offsets/tools with .Net
Hi Moray,
The Interpreter's ToolTable has a fixed length (128 entries). To remove a tool from the table use SetTool to set all of the fields to zero.
The Interpreter's ToolTable has a fixed length (128 entries). To remove a tool from the table use SetTool to set all of the fields to zero.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: G-codes/offsets/tools with .Net
Thanks for that.
I currently have a basic but working tool system, which I'll revisit later.
Anyway, my next challenge. Jogging.
I've looked at how KMotionCNC handles it, and it's a bit beyond my understanding of C++!
I see each jog button initialises it's own CMotionButton, but my understanding stops there. I see that jogging commands ultimately start a new thread to handle the jog, and there is lots of functionality in Motion.cpp to handle buttons, but I get lost trying to understand how the logic from a jog button press, through to the jog happening.
I've also looked at how the KFlopWebNC handles it, and it ultimately just ends up commanding an axis jog.
Now is there any reason why KMCNC uses such a complex method?
Or can I just rely on directly commanding jogs, while ensuring that it's actually safe to jog?
I.e. we're not in the middle of running some G-code.
I currently have a basic but working tool system, which I'll revisit later.
Anyway, my next challenge. Jogging.
I've looked at how KMotionCNC handles it, and it's a bit beyond my understanding of C++!
I see each jog button initialises it's own CMotionButton, but my understanding stops there. I see that jogging commands ultimately start a new thread to handle the jog, and there is lots of functionality in Motion.cpp to handle buttons, but I get lost trying to understand how the logic from a jog button press, through to the jog happening.
I've also looked at how the KFlopWebNC handles it, and it ultimately just ends up commanding an axis jog.
Now is there any reason why KMCNC uses such a complex method?
Or can I just rely on directly commanding jogs, while ensuring that it's actually safe to jog?
I.e. we're not in the middle of running some G-code.
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: G-codes/offsets/tools with .Net
Hi Moray,
HTH
It becomes complicated when non-linear kinematics and/or geometric corrections are used. In those cases to Jog along a straight line requires Jogging multiple axes in a dynamically changing manner. We have been working on a newer method that better handles the varying acceleration times when multiple axes are involved which may or may not be even more complex. It's difficult as we want the Operator to be able to change directions and speed at random with quick response and unlike GCode the path is not predetermined.Now is there any reason why KMCNC uses such a complex method?
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: G-codes/offsets/tools with .Net
I suspected kinematics/geo correction might be the case.
I'm assuming using the basic Jog() call, ignores any kinematics/geo correction?
I'm assuming using the basic Jog() call, ignores any kinematics/geo correction?
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: G-codes/offsets/tools with .Net
Correct.I'm assuming using the basic Jog() call, ignores any kinematics/geo correction?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: G-codes/offsets/tools with .Net
Thanks for that Tom.
I've managed to get a basic jog working for now, so I'll extend that to the other axis, then look at improving things later.
I've managed to get a basic jog working for now, so I'll extend that to the other axis, then look at improving things later.
Re: G-codes/offsets/tools with .Net
I'm working on the DRO process, and have roughly been following the KMCNC code, but seem to have hit a snag.
TransformActuatorstoCAD isn't available in .net/C#
Am I correct in guessing that ConvertAbsoluteToInterpreterCoord and ConvertAbsoluteToMachine are the relevant .net methods?
If so, is there any specific requirement for getting the KM_Interpreter?
Or can I just add it to the same timer as where KM_Mainstatus gets updated?
TransformActuatorstoCAD isn't available in .net/C#
Am I correct in guessing that ConvertAbsoluteToInterpreterCoord and ConvertAbsoluteToMachine are the relevant .net methods?
If so, is there any specific requirement for getting the KM_Interpreter?
Or can I just add it to the same timer as where KM_Mainstatus gets updated?
Re: G-codes/offsets/tools with .Net
OK, scrap the ConvertAbsoluteTo functions, as I've done some digging and realised they work in solely in CAD space, not counts.
So is it possible to convert machine counts, to CAD while allowing for the Kinematics?
So is it possible to convert machine counts, to CAD while allowing for the Kinematics?