These are chat archives for machinekit/machinekit

14th
Jun 2017
zhivko
@zhivko
Jun 14 2017 10:57 UTC
I am looking for motion.current-vel and how it is calculated. For my case I have x,y,z and a axis (rotation around z) it seems that when xyz velocities are 0, and a_vel>0 motion.current-vel = 0...
it seems that if a_vel > 0 also motion.current-vel should be >0 (but thats not the case)
I see machinekit/machinekit#438
is there a plan to merge this into MK ?
Bas de Bruijn
@luminize
Jun 14 2017 13:06 UTC
There's nobody working on merging joints-axes.
It all depends on how you calculate velocity. I think in your situation an a-axis is a rotation, and not a translation. So if you'd want surface velocity, why not calculate it by rotational speed and distance from center.
Do you know if joints-axes will solve your problem?
zhivko
@zhivko
Jun 14 2017 13:20 UTC
Hi @luminize
Yes exactly I need to calculate this but I think this is done in motion component...
I was looking through code to see where it is done...
I am not sure if joints-axes could solve problem,
zhivko
@zhivko
Jun 14 2017 13:43 UTC
zhivko
@zhivko
Jun 14 2017 15:33 UTC
Now looking for where motion.requested_vel is calculated - any idea ?
probably it comes from gcode an it's not calculated
Bas de Bruijn
@luminize
Jun 14 2017 15:52 UTC
I'm not into the motion component. But since you have a coordinate (x,y,z) and an a-axis velocity it's just a matter of some simple math with some HAL components to know your surface speed
What are you exactly trying to do?
zhivko
@zhivko
Jun 14 2017 15:53 UTC
I have this thc component that depends on motion.requested-velocity
I now managed to see that otion.requested-velocity is jumping from fixed value to 0.
I will record halscope picture of this...
Because of this thc also gets enabled and disabled and that's not OK...
So now I try to figure out WHY I have this oscillations of requested-velocity.
OK here it is
you can see requested-velocity going up and down... hmm...
zhivko
@zhivko
Jun 14 2017 16:02 UTC
yes - I have managed to calculated velocity with simple math ...
this thc comp depends on requested velocity:
and since it becomes zero as you see in above graph - I get unsteady thc operation as consequence....
thc comp having thc operation turning on and off...
Bas de Bruijn
@luminize
Jun 14 2017 18:16 UTC
Why don’t you take the motion.current-vel pin? Can you show a scope with that one?
zhivko
@zhivko
Jun 14 2017 18:18 UTC
You have it in picture
Blue line
Bas de Bruijn
@luminize
Jun 14 2017 18:18 UTC
ah yes, sorry
you need to figure out why you get zero values
where do you generate your trajectory?
zhivko
@zhivko
Jun 14 2017 18:20 UTC
I was thinking maybe vel-requested is consequence of thc action, but then why they would depend on it...
In thc
Bas de Bruijn
@luminize
Jun 14 2017 18:21 UTC
full stop... what do you need? the actual current velocity? if so, why do you talk about requested velocity?
zhivko
@zhivko
Jun 14 2017 18:22 UTC
Check code of thc comp i pasted above
Bas de Bruijn
@luminize
Jun 14 2017 18:22 UTC
no
zhivko
@zhivko
Jun 14 2017 18:22 UTC
Its required in the code
Bas de Bruijn
@luminize
Jun 14 2017 18:23 UTC
explain to me
zhivko
@zhivko
Jun 14 2017 18:24 UTC
It seems operation of thc is disabled if actual velocity is les then percentage of requested vel
Its called corner lock....
But what i dont understand they disable operation if requested vel = 0
Bas de Bruijn
@luminize
Jun 14 2017 18:27 UTC

I know nothing about thc comp. Not familiar with “corner lock”. What’s that?

You need to find out why you get zero values. so somewhere you generate commands that get calculated as a path. you might have queue busters which demand the motion to go to zero.

http://www.machinekit.io/docs/man/man9/motion/ -> requested-vel is pretty sparse info.
zhivko
@zhivko
Jun 14 2017 18:31 UTC
Will try to disable thc to see if req-vel trips to 0 also.
Bas de Bruijn
@luminize
Jun 14 2017 18:32 UTC
if that is motion.requested-vel then that’s of no use, since it is output of the motion component, and knows nothing of other components.
zhivko
@zhivko
Jun 14 2017 18:32 UTC
Otherwise in my gcode feed is always >0 hence i think i do not cause such req vel anyhow.
Bas de Bruijn
@luminize
Jun 14 2017 18:33 UTC
do you use Mcodes in your NC file?
zhivko
@zhivko
Jun 14 2017 18:35 UTC
M66 P0 L3 Q5
This is only one
But this should not do this i thik because i am running code in sim, plasma is not turned on.
So execution always waits 5 sec (it timeouts)
Bas de Bruijn
@luminize
Jun 14 2017 18:38 UTC
one moment, bbl
zhivko
@zhivko
Jun 14 2017 18:39 UTC
Q5 means timeout 5sec
Bas de Bruijn
@luminize
Jun 14 2017 18:43 UTC
I think your problem is that because you have >3 axes blending is not working. It’s the same with 3D printers, which result in a lot of small segments, where at each point speed is reduced to zero.
you could try first a moving average filter, just to see if that improves things. What you also could do is to suppress the zero of motion.requested-vel if it is less than (you decide) periods.
if you were to use the delayline component then you can “create” look-ahead by delaying the motion pins. So then you know if the coming “zero” is a very short time period, or a longer one.
Bas de Bruijn
@luminize
Jun 14 2017 18:50 UTC
can you capture a scope (like previous one)
• with more gain
• smaller time div (so we can see of the motion.requested-vel edges)
• on the same pos
zhivko
@zhivko
Jun 14 2017 18:52 UTC
Ok thank you very much for now.
I need to go on concert
Andre Rieu
Bas de Bruijn
@luminize
Jun 14 2017 18:54 UTC
have fun, he’s from NL
zhivko
@zhivko
Jun 14 2017 18:55 UTC