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

So I could use [#[#200+4900]] to access the data at #4900 if #200 
contains 0.  4919 if #200 contains 19 etc etc?

That syntax I hadn't tried. I had assumed a #numbered access would start 
with a # sign, but wrap the rest in a set of []. I've scanned thru the 
most recent .pdf, about 2 weeks old I believe, and there do not appear 
to be any examples in it to guide one in writing something like this.

But see my msg to Andy just now, I cannot even get that far.

That last line fails to assign a value, even if the next line is an M2.

> 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.
>
> (the complete g-code program that I picked that line from does
> variable diameter, variable pitch threading, and is described in
> detail here:
> http://jmkasunich.com/cgi-bin/blosxom/shoptask/fusee-1.html )

I have seen that before, you posted a link years ago, but my wet ram is 
not photographic anymore.  Darn it.

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