These are chat archives for machinekit/machinekit

23rd
Sep 2016
zhivko
@zhivko
Sep 23 2016 12:27
I am again working with G92, to offset coordinates - and I cannot make it work... after issuing G92, I am resubscribing to motion to get new position, but this position stays always same. What can I check additionally - I know this is more linuxcnc related that machinekit, but guys on linuxcnc irc don't want to listen about it when I mention I have machinekit... they say - yes - machinekit was someday ago linuxcnc - but it isn't annymore (cry :( )
zhivko
@zhivko
Sep 23 2016 12:38
SInc ethey say it isnt linuxcnc anymore - how can I check what latest linuxcnc functionality was brought to the MK ? or which linuxcnc version is inside MK ?
Michael Haberler
@mhaberler
Sep 23 2016 12:40
Well sorry but those comments are counterfactual to be polite
Offset application is in the canon layer and always was
Motion really has no clue about offsets (one of themajor design defects imo)
zhivko
@zhivko
Sep 23 2016 12:42
hmm... how can I know MK canon layer is same as linuxcnc canon layer - I mean - they can make some improvements to cannon layer - how can I know we stil have same versions of cannon?
Michael Haberler
@mhaberler
Sep 23 2016 12:42
So "resubscribing" still will not make motion aware of offsets
Because it cant - both truefor lcnc and mk
So the gentlemen were handwaving and spfeading fud
zhivko
@zhivko
Sep 23 2016 12:43
so motion always reports position coordinates in machine coordinate system?
Michael Haberler
@mhaberler
Sep 23 2016 12:43
Read the canon codeto get theidea
Read the canon codeto get the idea
Motion understands units but not offsets
See the rotate_and_offset etc functions (or similar)
zhivko
@zhivko
Sep 23 2016 12:46
OK but theoretically if I issue G92
motion planer will take this into acount
Michael Haberler
@mhaberler
Sep 23 2016 12:46
Canon does
zhivko
@zhivko
Sep 23 2016 12:46
and I can then compensate in my ui for this
Michael Haberler
@mhaberler
Sep 23 2016 12:47
Canon also unoffsetz and unrotates the values from motion for ui use
You do want to look at emcstat not motion pins
zhivko
@zhivko
Sep 23 2016 12:48
AH! this is what I needed
Michael Haberler
@mhaberler
Sep 23 2016 12:48
Wrong layer
One too deep
Read emccanon.cc - worth the time
zhivko
@zhivko
Sep 23 2016 12:49
So I imagine machinetalk can get emcstat structures back,
OK will do that...
Michael Haberler
@mhaberler
Sep 23 2016 12:49
Mkwrapper can
Haltalk is hal- only
zhivko
@zhivko
Sep 23 2016 12:50
yes that one I had in mind...
Michael Haberler
@mhaberler
Sep 23 2016 12:50
Or the the python linuxcnc module which interacts with emcstat
Mkwrapper uses that
zhivko
@zhivko
Sep 23 2016 12:51
OK thank you - I think I know in what direction need to go... Thank you very much!
Oh - but I am already doing: MT_EMCSTAT_INCREMENTAL_UPDATE
for motion message type
So this meand I am getting position from cannon layer?
Michael Haberler
@mhaberler
Sep 23 2016 12:53
Yes
zhivko
@zhivko
Sep 23 2016 12:54
but this means I should have adapted values back - acknowledging G92 issued before...
Michael Haberler
@mhaberler
Sep 23 2016 12:54
Positions flow through emccanon where they are offsetted and rotated towards motion, and unoffsetted and unrotated when coming from mtion to emcstat
All your questions will be answered by reading emccanon.cc
zhivko
@zhivko
Sep 23 2016 12:56
OK thanks! say no more
;)
OK I see code - but to troubleshoot - should I put additional debug lines in emccanon and recompile? I mean what would you do to check if g92 are acknowledged?
Michael Haberler
@mhaberler
Sep 23 2016 13:00
What about gdb milltask and set breakpoints
Debug by printf is a bit 70ies ;-)
zhivko
@zhivko
Sep 23 2016 13:01
Never done that - but I guess it is always first time sometime
Michael Haberler
@mhaberler
Sep 23 2016 13:01
Very worth the time learning gdb
zhivko
@zhivko
Sep 23 2016 13:01
usually I debug in eclipse CDT and gdb ;)
Michael Haberler
@mhaberler
Sep 23 2016 13:01
Immediate timesaving
Omigawd eclipse
Not patient enouh for that
zhivko
@zhivko
Sep 23 2016 13:03
actually I can try create eclipse project and connect to remote gdb...
OK will try to do that...
thank you for now!