Try #<_current_depth> = [[#<_loop_count> + 1] * [#<_max_cut>]]
n Wed, 27 May 2009 23:50:12 +0100 alan battersby <alan.batter...@ntlworld.com> wrote: > Hi , > I am trying to generate gcode automatically but seem to have a problem. > Can anyone tell me why I get the error message > > near line 27 bad character '*' used > > in this code running on axis on emc 2.4.0 simulator > thanks > Alan > > (----------------------------------------) > (Date: 27/05/2009 00:00:00) > (Code for 3 Paths) > (3 depth passes) > (Work Rotates around A axis) > (EMC GCode generated automatically) > (----------------------------------------) > O1000 sub (Path 0) <-------------------- not generated this yet. > O1000 endsub (End of Path 0) > > O2000 sub (Path 1) > O2000 endsub (End of Path 1) > > O3000 sub (Path 2) > O3000 endsub (End of Path 2) > > (Loop to cut each path in turn) > (Uses the following global variables) > #<_loop_count> = 0 (the current loop count) > #<_max_count> = 3 (the maximum loop count) > #<_max_cut> = 2 (the cutter depth increment for rough cuts) > #<_current_depth> = 0 (the current cutter depth) > #<_max_depth> = 5 (The maximum depth of paths in the model) > > O4000 while [#<_loop_count> LT #<_max_count>] > #<_current_depth> = [#<_loop_count> + 1] * [#<_max_cut>] > <----------------- this is line 26 assume problem here > O4100 if [#<_current_depth> GT #<_max_depth>] > #<_current_depth> = [#<_max_depth>] > O4100 endif (End of depth check) > > O1000 call (Call Path 0) > O2000 call (Call Path 1) > O3000 call (Call Path 2) > > #<_loop_count>= [#<_loop_count>+1] > O4000 endwhile (End of cutter depth loop) > > (Move up to safe height and zero position) > G90 > G00 Z-10.0 > G00 X0.0 Y0.0 A0.0 > M2 > (-----End of Program-----) > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users