Re: [Emc-developers] Dynamically building a string for a varname?
On 2/29/24 15:56, andy pugh wrote: On Thu, 29 Feb 2024 at 18:14, gene heskett wrote: Is it possible to concatenate several string vars into a variable name in order to access an array of vars No. But you can do this with numbered variables. So #[100 + #3] is a valid construction. tholefinder.ngc currently uses #100 and #101 to return the exact xy location of the bolthole its positioned to check (but that is adjustable) so I likely will use #200, #210, #220 for the anchor points of the 3 0-9 element arrays for x,y,z. Any possible interference with o### etc while/do/etc markers? How do I initialize that to 0., the same way, I assume by #300=0, then #3000=first hole location x while incremnting #300 to 9 #3010=y location etc, #3020=zlocattion. Just to make sure its reserved when I write the actual data returned from tholefinder (which returns the exact center of the holes x in #100 y=in #101 etc) to that location for later use. This will greatly simplify the code, thank you very much Andy. Even simpler if I don't have to init the storage until I actually have data to write to that location. Thanks Andy. Stay warm & well. Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
Re: [Emc-developers] Dynamically building a string for a varname?
On Thu, 29 Feb 2024 at 18:14, gene heskett wrote: > Is it possible to concatenate several string vars into a variable name > in order to access an array of vars No. But you can do this with numbered variables. So #[100 + #3] is a valid construction. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
[Emc-developers] side question
On these chinese linear bearing rails, are the boltholes drilled in two ops. the shcs hear socket, then the bolt hole on thru, or with a custom cutter all in one step? My probe is a 12 gauge copper wire, spinning at 300 revs in the spindle and might have enough tip wobble to prevent it from descending into the 3mm bolt hole to actually measure the bolthole so I may have to settle for centering in the SHCS counterbore. And assume the bolthole is centered in the SHCS clearance. My experience has been they're a lot sloppier at the bolt hole locations than in bearing precision which is pretty good. What is your experience in similar situations? Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
[Emc-developers] Dynamically building a string for a varname?
Good afternoon; Is it possible to concatenate several string vars into a variable name in order to access an array of vars by appending one or more chars to build the name of an array of values? Something like starting with the general array name like the first 5 chars of "#<_ar" then append the axis letter, then append the while loops control variable 0 to 9 and add a final ">" to terminate the name of the var winding up with #<_arx4>, in this case meaning the 5th x location storage name, assuming a base0 numbering system. I've spent several hours scanning thru the docs pdf w/o finding any string manipulation stuff. It would be handier than sliced bread or bottled beer for this. And would shrink my final code to 15% of unrolling the whole maryann bolthole by bolthole. Thanks all. Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
Re: [Emc-developers] got usability problem w/master
On 2/29/24 04:05, andy pugh wrote: On Wed, 28 Feb 2024 at 17:14, gene heskett wrote: The Halshow "Watch" tab can be better for this. Sounds useful. is it covered by a manpage? https://linuxcnc.org/docs/stable/html/hal/tools.html#_halshow Bookmarked, thanks Andy. Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
Re: [Emc-developers] got usability problem w/master
On 2/29/24 04:03, andy pugh wrote: On Wed, 28 Feb 2024 at 21:29, gene heskett wrote: and I've copies of it in nc_files and in nc_files/subs, error msg claims EOF while searching for it. That isn't the most helpful message, it means that it hasn't found the subroutine in the current G-code file (and had got to the end of the file looking) What this normally means is that the subroutine file has not been found in the subroutine path. Working out why can be difficult. I think I have that sorted Andy, deep in the docs is a mention that it need the "o sub" at the head of the file, an ends with "o endsub", and I had never added that stuff to the file. So I did now. So that s/b fixed. But I was getting wet running back and forth to the machine as it rained fairly steadily all day yesterday Since theres a bucket of holes to be drilled, I have setup a slew of vars, #<_arx, #<-ary, #<_arz with a single digit hex value as the next character and of coarse a closing ">. I'll only drill every 2nd or 3rd hole as this is the X axis for a 3d printer, 490mm long. 9mm wide linear bearings top and bottom of a 540mm long 20x20 cf tube. Puting flying weight on a starvation diet, printing parts that were originally poorly designed and made from 8mm steel plate! Now, I know bash can do it, I've done it decades ago in amigados and either bash or ARexx, but can lcnc concatenate 4 strings, starting with "#<_ar" one the axises(x,y,z), as the 2rd arg, the while counter value in hex and the 4th the ">" in order to dynamically generate the var name "#<_arx5>" that can then be used to address that particular variable? That would allow me to write this as a while loop as opposed to unrolling this into 1600 LOC. Most of which is copy, paste, edit. If lcnc can do this, what section discusses the howto? Thanks Andy. Take care & stay well. Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
Re: [Emc-developers] got usability problem w/master
On Wed, 28 Feb 2024 at 17:14, gene heskett wrote: > > The Halshow "Watch" tab can be better for this. > Sounds useful. is it covered by a manpage? https://linuxcnc.org/docs/stable/html/hal/tools.html#_halshow -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
Re: [Emc-developers] got usability problem w/master
On Wed, 28 Feb 2024 at 21:29, gene heskett wrote: > and I've copies of it in nc_files and in nc_files/subs, error msg claims > EOF while searching for it. That isn't the most helpful message, it means that it hasn't found the subroutine in the current G-code file (and had got to the end of the file looking) What this normally means is that the subroutine file has not been found in the subroutine path. Working out why can be difficult. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers