Jeff Epler schrieb:
> AXIS can automatically execute a filter program when loading a
> machinable file.  You can also use the NML messages for issuing "MDI"
> commands to feed your program in line-by-line.  (I just verified that,
> at least in the development version of emc 2, this doesn't kill blending
> altogether, though it's likely that blending degrades more quickly when
> fed by MDI than by file)
> 
> Personally, I lean towards using filters because then I benefit from the
> preview plot.
> 
> Using tcl as a gcode preprocessor: http://axis.unpy.net/01167315565
> 
> To make ".gcl" files openable in axis, put this in your inifile:
>     PROGRAM_EXTENSION .gcl TCL-preprocessed gcode
>     gcl = /path/to/gcode.tcl
> and make gcode.tcl executable

While these preprocessors look really useful, they don't support what
Ron thinks of, which would be a programming language which is able to
feed commands to emc2 as well as get feedback from emc2. Assuming a perl
binding, this could mean

=====================================================================my
$emc = new CNC::EMC2;
$emc->move({ X => 0, Y => 0, Z => 10 });
$emc->straight_probe( { Z => 0 } );
if ($emc->probe_tripped) {
        printf("%d %d %d\n",$emc->trip_x,$emc->trip_y,$emc->trip_z);
} else {
        # do something else
}
my $dialog=new Dialog;
# do whatever is needed to open a dialog which allows jogging
# of all axes as well as direct entering of target positions,
# to select {max,min}[xyz]

surface_scan($minx,$miny,$minz,$maxx,$maxy,$maxz);
...
=====================================================================

See the difference? _Many_ people, including me, are certainly more
comfortable at writing complex code in a more readable language than
G-Code. And at that, probably also a language easier to understand at
first glance that TCL (I don't understand your gcode.tcl filter script,
even though I can read C, C++, Pascal, Ruby, PHP, Perl, lua, Basic, ...
easily).

Speaking of the above: lua would probably be a really good choice if you
want to implement a scripting language inside emc2.

Regards,
Sven

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to