Am 25.01.2014 um 18:20 schrieb Robert Ellenberg <[email protected]>:

> Hi All,
> 
> Is is possible to query the state of the interpreter from within the motion
> module?Specifically, I'd like to be able to check if the interpreter has
> reached the end of the program, and won't be sending more segments. I
> thought this might be stored in one of the emcmot structs, but I didn't see
> anything obviously pointing to interpreter state.


no, there is no bracketing of a 'interpreter run' - which makes it hard to tell 
program end from a queue underrun

it is a deficiency which should be fixed - each 'program run' (MDI or stored 
ngc) should get its own unique id
it should be fairly straightforward to add corresponding canon + NML commands. 
Just looking at interp state isnt good enough because it wont tell anything 
about commands queued in task.

btw the current motion comp cant tell either: 
http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob;f=src/emc/kinematics/tp.c;h=46d563cefda6afe597452e63dbbc6d80c6607bfa;hb=f142bd4c70b9d6f19ef735d3f2646c4885eb1ba1#l690

What needs to be considered is behavior during a sync operation (interpreter 
waits for motion queue to drain, which isnt a bona-fide underrun, but there is 
a TASK_PLAN_SYNC command which can be passed onto motion to tell about that 
state). The TASK_PLAN_RUN and TASK_PLAN_END commands could be passed on (I'd 
need to look what an MDI command generates, but if you crank up DEBUG in the 
.ini to 0xFFFFFFFF you'll see them all)

all of an abort, or m2, or just end-of-file or end-of-command should finish 
such a 'run' which is really a transaction bracket over an input sequence.

- Michael




------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to