On Saturday 05 December 2015 13:58:54 John Kasunich wrote:

> On Sat, Dec 5, 2015, at 01:22 PM, Gene Heskett wrote:
> > Short answer, no.  I can't find a method to reference a numbered
> > variable indirectly so that I can setup the init data code in a nice
> > neat little WHILE/ENDWHILE loop.  This also intimates that I cannot
> > access the #numbered data in a loop. So this code is going to a,
> > take a while to write, and B, look like a bust code generator spit
> > it out.
>
> LinuxCNC g-code can do indirect accesses.
>
> For example, this line:
>
> #110 = [#[#200+1100]]
>
> Assume that #200 contains the value "23".
> This line reads the value from #1123, and assigns it to #110.
> Basically I have an array of data starting at #1100, and #200 is the
> index into the array.
>
> This code was written ages ago (2008).  These days #200 and #110 could
> be named variables.  The "array" still need to be numbered.

To be less confuzin to my ancient wet ram, I followed your format fairly 
closely, and now have it initializing the array of 10 value each for x & 
y. And the debug statement can't deal with the offsets, so the #number 
has to be specified on a per debug line basis.

But now that I have it working, I am going to go back and scale the data 
so the G moves don't have to calculate all that on the fly.  All this 
takes place in the space of 3/16" of both x & y motions if I do it 
right. :)

But, try as I might, it seems I can get nothing out of the G5.2/G5.3 code 
except straight lines at an angle.  And the first set of co-ords IS a 
continuation of the straight Y motion that got it to the starting point.

So while its been educational, I think I'll go back to trying to make a 
45 degree g3 meet another 45 degrees of g2 in the middle. I've spent the 
whole day on this and the best I can get, if I used all 10 points of the 
2 arrays of data, is an initial straight line in the right direction, 
followed by a hand drawn curve that while Y progresses as expected, x 
winds back up at its point of origin.

Thanks John K.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to