how to use motion-logger?

More
25 Mar 2020 14:30 #161437 by Reinhard
Replied by Reinhard on topic how to use motion-logger?
Hi Chris,

I'm digging too ;)

Guess u r right - as both motion and motion-logger clear the shared memory in init_comm_buffers - that can't be sane.

I wonder - as I have a working code for nml-interface. Wouldn't it be possible, read the commands with my code?
Is motion-logger intended to read the same nml-queues than axis or any other lc-part does?
Or does motion have a different (/extended?) shared-memory view?

If it is the known nml queue that axis reads, I will try to read the commands by myself.

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 14:43 #161442 by cmorley
Replied by cmorley on topic how to use motion-logger?
I don't want to talk like I know something here - blind leading the blind... :)

Thu UIs use NML to talk to Task and Task uses NML to talk to motion or motion-logger
linuxcnc.org/docs/2.8/html/code/code-not...rchitecture_overview

Motion-logger just logs motion commands from Task's motion queue. AFAIK

Which commands do you want to read?

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 14:55 #161445 by Reinhard
Replied by Reinhard on topic how to use motion-logger?

I don't want to talk like I know something here ...

Well, I appreciate your support!
... and your guess is by far more than my knowing nothing ...
.

Motion-logger just logs motion commands from Task's motion queue. AFAIK

Well, that's what motion-logger is supposed to do for the unknown ... :dry:
.

Which commands do you want to read?

I had to realize, that status channel does not report all states and state changes. Some status messages are out of time or not implemented ...

When I discovered motion-logger, I had the hope, that it gets rid of ongoing things, I was missing.
My app works fine with the nml-interface of reading status messages and sending commands to lc-server.
Just wanted to get a bit closer to the hearbeat of lc.

... and as you said, that gremlin uses motion-logger as base, may be I could implement some sort of gremlin too? I don't like the idea to reparse the gcode in the UI just for getting gremlin to work.

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 15:04 #161449 by cmorley
Replied by cmorley on topic how to use motion-logger?
motion-logger in gremlin/AXIS is different.
it logs the tool position so it can plot it. (some how I forget)
It also reads the gcode and converts to OpenGL commands.
It does the gcode parsing when you load the program (that's why long programs can take a while to load)
It's written in C++ but it's a python library.

Can you embed Gremlin?

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 15:29 #161459 by Reinhard
Replied by Reinhard on topic how to use motion-logger?

it logs the tool position so it can plot it. (some how I forget)

Well, I already have the tool position, as I drive dro elements
.

It also reads the gcode and converts to OpenGL commands.

That's what I tried to avoid.
For me, its dumb, do the same stuff twice in different locations and duplicate code ...
I hoped, that backend would deliver enuf status informations for doing the gremlin stuff.
.

Can you embed Gremlin?

I dunno - but I guess it would not be possible.
But there exists an opengl library for java, so may be I can try it ...

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 15:38 #161461 by cmorley
Replied by cmorley on topic how to use motion-logger?

That's what I tried to avoid.
For me, its dumb, do the same stuff twice in different locations and duplicate code ...
I hoped, that backend would deliver enuf status information for doing the gremlin stuff.


I don't follow . where else is this done?
If you want to see the shape being cut then you must parse the file and convert it to graphics commands.

Chris

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 15:49 #161464 by Reinhard
Replied by Reinhard on topic how to use motion-logger?
Hi Chris,
.

I don't follow . where else is this done?

may be I got you wrong.
Backend parses gcode to generate motion commands.
I did understand you that way, that gremlin (foreground ui) parses gcode too to generate graphics commands (that's what I read from other ui programmers too, or at least that's what I thought to understand).
If that is true, for me the parsing happens twice: once in background and once in foreground - and both are of cause separate code domains.

Please Log in or Create an account to join the conversation.

More
25 Mar 2020 15:53 #161466 by cmorley
Replied by cmorley on topic how to use motion-logger?
Ah yes the code is _interpreted_ twice and separately.
I was speaking about the conversion to openGL commands that happens after that so didn't follow the road there..

A little quote from the remap docs might add some light:

For complete preview of a remapped code’s tool path some precautions need to be taken. To understand what is going on, let’s review the preview and execution process (this covers the Axis case, but others are similar):

First, note that there are two independent interpreter instances involved:

one instance in the milltask program, which executes a program when you hit the Start button, and actually makes the machine move

a second instance in the user interface whose primary purpose is to generate the tool path preview. This one executes a program once it is loaded, but it doesn’t actually cause machine movements.

Now assume that your remap procedure contains a G38 probe operation, for example as part of a tool change with automatic tool length touch off. If the probe fails, that would clearly be an error, so you’d display a message and abort the program.

Now, what about preview of this procedure? At preview time, of course it’s not known whether the probe succeeds or fails - but you would likely want to see what the maximum depth of the probe is, and assume it succeeds and continues execution to preview further movements. Also, there is no point in displaying a probe failed message and aborting during preview.

Please Log in or Create an account to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum