These are chat archives for machinekit/machinekit

23rd
Jun 2016
zhivko
@zhivko
Jun 23 2016 11:08
Hello everybody - I am experimenting with MT_HALRCOMP_INCREMENTAL_UPDATE - I created remote comp, and tied the signal to motion.program-line.
It is interesting that I am getting pin uodates from real line number and then sometimes this line number becomes 0.
This can also be observed in console output of machinekit:
Michael Haberler
@mhaberler
Jun 23 2016 11:09
yes, when there is no program running.
zhivko
@zhivko
Jun 23 2016 11:09
waiting for command #56from ['56E58679-B43F81A0'] to complete
send_pbcontainer: type: MT_HALRCOMP_INCREMENTAL_UPDATE
pin {
  handle: 758
  hals32: 67
}
serial: 58

send_pbcontainer: type: MT_PING

sending motion message
sending motion message
Motion id 67 took 0.526314 seconds (current 0)
Motion id 0 took 0.000008 seconds (current 0).
send_pbcontainer: type: MT_HALRCOMP_INCREMENTAL_UPDATE
pin {
  handle: 758
  hals32: 0
}
serial: 59
from this log you can see it is running
it is set to 67 - and then suddenly jumps to 0
This is something I cannot explain so I came here for advise...
:)
Michael Haberler
@mhaberler
Jun 23 2016 11:11
is that at the end of the program?
zhivko
@zhivko
Jun 23 2016 11:11
no in the middle
so I have gcode running and (not always) this happens
It is not consistent
Michael Haberler
@mhaberler
Jun 23 2016 11:12
oh man, motion id's
severely hacked concept
zhivko
@zhivko
Jun 23 2016 11:12
but "generally" works OK
But what it worries me I cannot rely on it
Michael Haberler
@mhaberler
Jun 23 2016 11:12
it was originally thought of as a unque motion id like a segment number
what do you want to rely on
it was repurposed as gcode line number, lots of issues with it
zhivko
@zhivko
Jun 23 2016 11:13
you mean why ?
Michael Haberler
@mhaberler
Jun 23 2016 11:13
what are you trying to achieve
zhivko
@zhivko
Jun 23 2016 11:13
I want to move pointer in gcode program
Michael Haberler
@mhaberler
Jun 23 2016 11:14
what is "pointer"
zhivko
@zhivko
Jun 23 2016 11:14
I want to higlight current executing line number
Michael Haberler
@mhaberler
Jun 23 2016 11:14
ah ok
well and the existing support is not good enough for some reason?
like the sourceview gladevcp widget
zhivko
@zhivko
Jun 23 2016 11:15
you mean existing hal pin motion.program-line ?
This message was deleted
Michael Haberler
@mhaberler
Jun 23 2016 11:15
no, I mean the existing means of displaying gcode and current pos
in axis, gmoccapy etc
zhivko
@zhivko
Jun 23 2016 11:16
ups - havent checked how is done there
but I thought reading hal pin motion-prog-line would be sufficient
Michael Haberler
@mhaberler
Jun 23 2016 11:16
checking existing before reinventing is a good idea ;)
zhivko
@zhivko
Jun 23 2016 11:17
in any case I want have this functionality in my client
Michael Haberler
@mhaberler
Jun 23 2016 11:18
You might want to check how motion id's are created - it might be for instance this is an artifical motion caused by blending
zhivko
@zhivko
Jun 23 2016 11:18
OK I will check there how is made which one you suggest ?
I mean which existing client ?
Michael Haberler
@mhaberler
Jun 23 2016 11:18
well you need to trace what motion ids go into motion (DEBUG= in ini)
and what comes out of it in terms of motion id
probably reading emc/tp will reveal some clues
every client which can display source feeback - follow the logic
i have no idea, cannot help you with that
just saying: motion id's are a severely hacked concept and there might be no easy answer
in case you find out it's blending motions generated by tp you might be able to assign a particular value which indicates it is autogenerated so clients could skip it
zhivko
@zhivko
Jun 23 2016 11:21
So you are saying that in client code MT_EMC_TASK_PLAN_STEP is implemented like there is immediate response from command servic eto this command ?
Michael Haberler
@mhaberler
Jun 23 2016 11:21
I do not understand the question
zhivko
@zhivko
Jun 23 2016 11:21
"every client which can display source feeback"
Michael Haberler
@mhaberler
Jun 23 2016 11:22
what does this have to do with step?
zhivko
@zhivko
Jun 23 2016 11:22
so is this meand you issue command like MT_EMC_TASK_PLAN_STEP and there should be reply from MK ?
emc/tp is "task plan" part of emc ?
Michael Haberler
@mhaberler
Jun 23 2016 11:23
no, this is the trajectory planner
task is in emc/task
zhivko
@zhivko
Jun 23 2016 11:23
aha
OK, to check existing code in clients - they probably have MT_EMC_TASK_PLAN_STEP functionality? What client is best to check ?
Michael Haberler
@mhaberler
Jun 23 2016 11:24
well if they have pause and step buttons: yes
zhivko
@zhivko
Jun 23 2016 11:24
do you know any such client where this work OK ?
I mean if you know I do not want to install each of them and see if this works there... if it iss not necessary
Michael Haberler
@mhaberler
Jun 23 2016 11:26
well like axis for instance?
you can also start from http://www.machinekit.io/docs/common/python-interface/ - see AUTOSTEP/PAUSE/RESUME
zhivko
@zhivko
Jun 23 2016 11:28
ok thnk you for now.. will check how it is there - if they also read hal pin - or something else..
zhivko
@zhivko
Jun 23 2016 12:17
Is there some information what subsbcribe topic status supports? and what exactly topic are? for example I know "motion" is one of them - are there others?
.getEmcStatusMotion().getCurrentLine()
return 0 currently - all the time
Michael Haberler
@mhaberler
Jun 23 2016 12:18
where are you subscribing, haltalk?
or mkwrapper
zhivko
@zhivko
Jun 23 2016 12:19
mkwrapper
Michael Haberler
@mhaberler
Jun 23 2016 12:20
not sure Alex reads this - recommendation: file an issue 'missing mkwrapper API documentation' and post your question there - it will be lost here
that said: read mkwrapper.py is your best course of action
zhivko
@zhivko
Jun 23 2016 12:21
i am reading and trying to find string "motion" finds nothing
zhivko
@zhivko
Jun 23 2016 12:23
I will subscribe to ""task" and see what happens
Michael Haberler
@mhaberler
Jun 23 2016 12:23
oops
not that hard to find ... ;)
zhivko
@zhivko
Jun 23 2016 12:25
oh yes it works now
.getEmcStatusMotion().getCurrentLine()
returns line
Michael Haberler
@mhaberler
Jun 23 2016 12:25
darn, what wonders a bit of reading does ;)
zhivko
@zhivko
Jun 23 2016 12:26
sure but would n't it be nice to have in docs - status suports this topics, error support this topics, etc... :)
Michael Haberler
@mhaberler
Jun 23 2016 12:26
great, take notes, write some asciidoc, post PR
that is how it works - there is no hidden documentation team in the cellar which you can send a wishlist to
and it might motivate the code author..
zhivko
@zhivko
Jun 23 2016 12:28
eh! I see where problem was - i was searching through coe with "task" instead 'task'
:)
Michael Haberler
@mhaberler
Jun 23 2016 12:28
shit happens ..
zhivko
@zhivko
Jun 23 2016 12:29
good to have in head for next don't know...
zhivko
@zhivko
Jun 23 2016 15:24
OK doing some more testing with: MT_HALRCOMMAND_DESCRIBE - i am reading pin motion.program-line now - I havent debugged yet but it seems for me that value is jumping from certain line number to 0 repeatedly - is this expected dbehaviour?
Michael Haberler
@mhaberler
Jun 23 2016 15:27
repeat: I cannot tell - you need to study the flow and how motion id's are generated. As I suggested this could be due to blending moves. So one way to figure is to disable blending by exact stop mode and see if the motion id zero still comes up. This would confirm blending as source.
that said - have you studied what other UI's are doing?
zhivko
@zhivko
Jun 23 2016 15:30
now I am looking into the: machinekit/src/emc/usr_intf/axis
it is using:
emcWaitCommandReceived(s->serial, s->s);