On 3/3/24 20:01, John Allwine wrote:
If you’re testing with MDI commands, either a local or global variable would
work. If you have a subroutine where you’re setting the value and then writing
an MDI command to print the value, then it would have to be a global variable
because a local variable would go out of scope.
That is ok, for this I'd rather use globals with unique names. It never
occured to me the debug might be broken and lieing to me.
What is the code that isn’t reliably working? In your example, it’s only the
(debug,) statements that aren’t behaving how you expect. The debug command
knows how to replace variable names, but doesn’t know how to evaluate an
expression. Assign the expression to a variable and then print that variable
and it will do what you want. If your variable goes out of scope, though,
before printing it then it won’t show anything in the variable.
I'm aware of that, John, that is the reason I asked the question. I've
not started on the re-write yet. I have 2 sets of arrays, one for
finding the top z beside the predrilled hole, and another set of three
to place the probe somewhere near the center of the hole and 2mm deeper
than the z for finding the xy. Electrical contact, spindle running so
the probe is dead circular. I have even done it with a tool spinning
backwards, does not mark a pcb.
Thank you, John. Take care & Stay well.
On Mar 3, 2024, at 4:56 PM, gene heskett <ghesk...@shentel.net> wrote:
On 3/3/24 17:33, John Allwine wrote:
Store it in another variable first:
#<myvar> = #[200+#50]
;debug,#<myvar>
That is what I am trying to do, prolly 20+ times in my present code but regardless
#<myvar> contains all balls. and its global here, 3 other machines including
the rpi4b running my Sheldon are also behaving identically. Works fine on the left of
the = sign does something else when its on the right side of the = sign.
I did get it to work but probably after a dozen tries. Dependably? TBD. And I'm
frazzled for this day. So I'll give it a try tom. Thanks John, take care & stay
well.
?? Does the local/global status of the var make a diff? I note you used a local
in your example above.
Thanks a bunch.
[...]
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 mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers
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