Hi Philipp,

a bit of guts first:

Configs with a UI which sports preview actually have two interpreters

there's one in the milltask process - this is the 'real one' which drives the 
machine, and which you've been talking to with your sample program
then there's a 'preview interpreter' in the UI process, which doesnt generate 
canon commands to drive the machine, but rather lines to be displayed in the UI.

in principle those two are unrelated ; of course they should work on the same 
ngc program. UI's deal with that by telling the preview interpreter to generate 
preview, and tell milltask to actually execute the program driving the machine.

what happened with your program: you talked to the milltask interpreter, which 
bypassed the UI - it cant possibly know of the new file

you might want to study axis-remote and the code in UI's to achieve the desired 
effect: http://linuxcnc.org/docs/html/man/man1/axis-remote.1.html

-Michael


Am 30.12.2013 um 17:28 schrieb Philipp Burch <p...@hb9etc.ch>:

> Hi all!
> 
> Maybe you remember my question of a few weeks ago about a more flexible
> way to transform the coordinates in a G-code file:
> http://sourceforge.net/mailarchive/forum.php?thread_name=528A6D98.7080208%40hb9etc.ch&forum_name=emc-users
> 
> My decision was then, to do most of the transforms in Python and
> generate the G-code as needed. I've now implemented most of that for my
> use case (alignment of a PCB panel based on fiducial marks) with a
> little Glade GUI. This works quite well, using the linuxcnc interface
> from Python
> (http://linuxcnc.org/docs/html/common/python-interface.html), it is
> possible to read the current position, do the calculations, generate the
> code, load and run it. Except for one thing: When I load the G-code
> file, AXIS does not display a preview of the program, neither in the
> code pane nor in the live plot. The file name is displayed in the
> window's title bar however, and running it works and correctly draws the
> backplot.
> 
> It is easy to test this in a Python console with LinuxCNC running:
> 
> $ python
> Python 2.6.5 (r265:79063, Sep 26 2013, 18:51:09)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import linuxcnc
>>>> lcmd=linuxcnc.command()
>>>> lcmd.reset_interpreter()
>>>> lcmd.mode(linuxcnc.MODE_AUTO)
>>>> lcmd.program_open('/home/linuxcnc/linuxcnc/nc_files/simple_symbol.ngc')
>>>> lcmd.auto(linuxcnc.AUTO_RUN, 1)
> 
> Does anyone have an idea what I could do to trigger the preview?
> Clicking the Reload button in AXIS does nothing (no error message, just
> nothing happens). Loading the same file from the AXIS menu shows the
> expected behaviour, code and graphic preview is generated.
> 
> The preview is obviously not critical for this application, but it would
> help to check if the alignment is correct (or at least not completely
> off). Could anyone give me a hint how to solve that?
> 
> Thanks!
> 
> Best regards,
> Philipp
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to