I tried and used the TCL preprocessor and I think it does the same things as 
O-Word, but it has far more possibilities and it is really more readable 
than O-Word, but O-word is read internally by the interpreter while with the 
TCL preprocessor and the filter for .gcl files a complete G-code program 
will be sent to EMC2.
I think that the point is not to have a command to move directly the 
machine, (like $emc->move({ X => 0})) because the same result can be 
achieved using the common G0 or G1 g-code commands  in the preprocessor, I 
think that the real point is, as told also by Sven, to have a way to get 
feedback from emc2. The  ability to get a feedback from EMC2 (or HAL) while 
working, would permit the interactive machining as requested by Ron.

for example:

if (hal.pin.0 == true)
   G0 X20
else if (hal.pin.1 == true)
   G0 Z20

ecc.ecc.

Regards

Manfredi



My websites: www.m24-pro.com
                      www.emc2cnc.altervista.org





>From: Sven Mueller <[EMAIL PROTECTED]>
>Reply-To: "Enhanced Machine Controller (EMC)" 
><emc-users@lists.sourceforge.net>
>To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
>Subject: Re: [Emc-users] Interactive machining
>Date: Sat, 18 Aug 2007 05:47:53 +0200
>
>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

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


-------------------------------------------------------------------------
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