Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread gene heskett

On 3/7/24 15:41, Alan Condit via Emc-developers wrote:

Gene,

In the second block of code following the while loop you’re missing some more 
“call”s




o1 while[#50 le 7] ( stop short )
( Enf of MAIN WHILE LOOP )
o5 endif
o6 if [#<_measure> lt 1] <<< is still 1
o7 do
o call
o  call (see what its got)
o call (move to it)
(put drill hole call here)
#50 = [#50 +1]
o7 while [#50 le 7]
o6 endif
M2


On Mar 7, 2024, at 11:20 AM, emc-developers-requ...@lists.sourceforge.net wrote:

o1 while[#50 le 7] ( stop short )
( Enf of MAIN WHILE LOOP )
o5 endif
o6 if [#<_measure> lt 1]
o7 do
o
o (see what its got)
o (move to it)
(put drill hole call here)
#50 = [#50 +1]
o7 while [#50 le 7]
o6 endif
M2



___
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


Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread gene heskett

On 3/7/24 12:55, John Allwine wrote:

Lines 188-190 are missing calls.

But they at this time, never execute as #<_measure> is 1, might as well 
be an M2 above them.


On Thu, Mar 7, 2024 at 10:21 AM gene heskett  wrote:


On 3/7/24 12:12, andy pugh wrote:

On Thu, 7 Mar 2024 at 16:44, gene heskett  wrote:


o

It needs to be

o CALL


What line Andy, call is there in line 160 of the main do/while loop,
you've got week old code i think as I've posted two versions.


That was from the version you posted 1 hour ago.

I can only work with what you provide.

See line 163 of this file. I do recall adding the call to that line, a
week ago. This one should have a 10 something am date today


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


Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread Alan Condit via Emc-developers
Gene,

In the second block of code following the while loop you’re missing some more 
“call”s

o1 while[#50 le 7] ( stop short )
( Enf of MAIN WHILE LOOP )
o5 endif
o6 if [#<_measure> lt 1]
o7 do
o call
o  call (see what its got)
o call (move to it)
(put drill hole call here)
#50 = [#50 +1]
o7 while [#50 le 7]
o6 endif
M2

> On Mar 7, 2024, at 11:20 AM, emc-developers-requ...@lists.sourceforge.net 
> wrote:
> 
> o1 while[#50 le 7] ( stop short )
> ( Enf of MAIN WHILE LOOP )
> o5 endif
> o6 if [#<_measure> lt 1]
> o7 do
> o
> o (see what its got)
> o (move to it)
> (put drill hole call here)
> #50   = [#50 +1]
> o7 while [#50 le 7]
> o6 endif
> M2


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread Alan Condit via Emc-developers
Gene,

In the second block of code following the while loop you’re missing some more 
“call”s

o1 while[#50 le 7] ( stop short )
( Enf of MAIN WHILE LOOP )
o5 endif
o6 if [#<_measure> lt 1]
o7 do
o call
o  call (see what its got)
o call (move to it)
(put drill hole call here)
#50 = [#50 +1]
o7 while [#50 le 7]
o6 endif
M2

> On Mar 7, 2024, at 11:20 AM, emc-developers-requ...@lists.sourceforge.net 
> wrote:
> 
> o1 while[#50 le 7] ( stop short )
> ( Enf of MAIN WHILE LOOP )
> o5 endif
> o6 if [#<_measure> lt 1]
> o7 do
> o
> o (see what its got)
> o (move to it)
> (put drill hole call here)
> #50   = [#50 +1]
> o7 while [#50 le 7]
> o6 endif
> M2


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread John Allwine
Lines 188-190 are missing calls.


On Thu, Mar 7, 2024 at 10:21 AM gene heskett  wrote:

> On 3/7/24 12:12, andy pugh wrote:
> > On Thu, 7 Mar 2024 at 16:44, gene heskett  wrote:
> >
> >>> o
> >>>
> >>> It needs to be
> >>>
> >>> o CALL
> >>>
> >> What line Andy, call is there in line 160 of the main do/while loop,
> >> you've got week old code i think as I've posted two versions.
> >
> > That was from the version you posted 1 hour ago.
> >
> > I can only work with what you provide.
> See line 163 of this file. I do recall adding the call to that line, a
> week ago. This one should have a 10 something am date today
>
>
> 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


Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread gene heskett

On 3/7/24 12:12, andy pugh wrote:

On Thu, 7 Mar 2024 at 16:44, gene heskett  wrote:


o

It needs to be

o CALL


What line Andy, call is there in line 160 of the main do/while loop,
you've got week old code i think as I've posted two versions.


That was from the version you posted 1 hour ago.

I can only work with what you provide.
See line 163 of this file. I do recall adding the call to that line, a 
week ago. This one should have a 10 something am date today



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
( linear_bearings.ngc, copyright 25 Feb 2024 by Maurice E Heskett, CET )
#<_measure>=1. ( zero to drill after changing fr probe to 3mm cutter )
#<_hole_spc> = 60. ( nominal space beteen holes drilled )
#<_xy_spd>  = 15
#<_z_spd>   = 25
( first find starting x y z )
G17 G21 G40 G49 G54 G80 G90 G94 ( setup to use xy arcs, metric, )
( cancel diameter comp,cancel length off set, G54 coordinates system 1, )
( cancel any canned cycles, absolute distances, feed per minute mode )
( setup contact to ground to bearing, put probe in spindle with probe wire )

( NOTE Andy Pugh says this is a valid way to address an array: #[100 + #3] )
( but he didn't mention that debug was broken, so if we want to use it )
( to a global var, we must first copy the #<_gvar> = #[basenum+#50] )
( rather cumbersome proceedure )
(pre-alloocate the bounce vars for floats)
o sub
(allocate vars)
#<_zx> = 0. (for z stuffs)
#<_zy> = 0. (for z stuffs)
#<_zz> = 0. (for z stuffs)
#<_xyx> = 0. (for hole stuff)
#<_xyy> = 0. (for hole stuff)
#<_xyz> = 0. (for hole stuff)
(so first, lets see if it actually works )
#50=0 ( set index to zeroth element )
#[200+#50] =  4 ( zeroth x location for z_check )
#[210+#50] =  1.117 ( zeroth y location for z_check )
#[220+#50] =  -66 ( zeroth height to begin  z search )
#[230+#50] =  9.5 ( zeroth hole xy x location )
#[240+#50] =  1.117 (zeroth holes xy y location )
#[250+#50] =  [-1.75 + #[220+#50]] ( to see if math works)
(debug, init_arrays done)
o endsub

o sub
( now, copy all that to global vars )
#<_zx> = #[200+#50] (z_check x)
#<_zy> = #[210+#50] (z_check y)
#<_zz> = #[220+#50] (z_check z)
#<_xyx> = #[230+#50] (hole_check x)
#<_xyy> = #[240+#50] (hole_check y)
#<_xyz> = #[250+#50] (hole_check z)
o endsub

o sub
(now the acid test, did it work?)
(debug,lb 48 holenum=#50)
(debug,lb 49 zx=#<_zx> #<_zy> #<_zz>)
(debug,lb 50 xyx=#<_xyx> #<_xyy> #<_xyz>)
(debug,lb 51 #100  #101  #102) 
o endsub 

o sub
( uses hole arrays 230-240-250 but update all for this hole ) 
#[230+#50] = #100 (metric x return from hole_finder)
#[240+#50] = #101 (metric y return from tholefinder)
#[250+#50] = #102 (metric z return from latest g38.2 z-70)
o endsub

o sub
#51 =   [#50+1] ( make 51 into next member of array )
#[210+#51]  =   #101 (propagate current z_c Y)
#[220+#51]  =   #102 (propagate current z_c Z)
#[230+#51]  =   [#100 + #<_hole_spc>] (add hole_spc to x for next hole)
#[200+#51]  =   [#[200+#50] + #<_hole_spc>] (increment z c x spot too)
#[240+#51]  =   #101 ( propagate found y to next hole)
#[250+#51]  =   #102 ( propagate found z to next hole)
o endsub

o sub
(debug,lb zc 72 in z check)
s1000 (set spindle rpms)
(debug,zc 74 spindle speed set 1000)
G1 F1500 z-50 (lift tp clear traveler)
G1 f1500 x#<_zx> y#<_xyy> (goto location of z check)
G1 F1500 z[#<_zz> +1] (should be a mm above rail)
M4 (start spindle, backwards)
G4 P.3 (give move time to complete)
G38.2 F15 z-70 ( locate top of rail for 1st time)
#102 = #5063 ( save real z in mm)
(debug,lb zc 82 Z=102=#102)
M5 (stop spindle)
o endsub

o sub
(debug,lb hc 87)
G1 f1500 z-50  (clear traveler )
G1 f1500 x#<_xyx> y#<_xyy> (position over next hole) 
G1 f1500 z[#102 -1] (#102 has ben set, should place into hole counterbore)
o endsub

( call hole_finder in main loop)

o sub
(debug,lb hc 94)
G1 f1500 z-50  (clear traveler )
G1 f1500 x#100 y#101 (re-position over this hole using found values) 
G1 f1500 z[#102 -4] (#102 has ben set, should place into small hole)
(ready for 2nd call to hole_finder)
o endsub

o sub
G1 f1500 z-50
G1 f1500 x#<_xyx> y#<_xyy>
G1 f1500 z[#<_xyz> +15] (should place above hole)
M4
G4 P10 (pause for inspection)
M5
o endsub

o sub
(no z motion now)
(debug,HF 113 s/b just into current hole)
M4 (start spindle in reverse)
G4 p.25
G38.2 F#<_xy_spd> X[#<_xyx>-10] (find left side)
G1 F1500 X#<_xyx> Y#<_xyy> (recenter)
#110=#5061 (record it)
G4 p.25
G38.2 F#<_xy_spd> X[#<_xyx>+10] (find right side)
G1 F1500 X#<_xyx> Y#<_xyy> (recenter current hole)
#111=#5061 (record it)
g4 p.25
G38.2 F#<_xy_spd> Y[#<_xyy>+10] (find back side)
G1 F1500 X#<_xyx> Y#<_xyy> (recenter current hole)

Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread andy pugh
On Thu, 7 Mar 2024 at 16:44, gene heskett  wrote:

> > o
> >
> > It needs to be
> >
> > o CALL
> >
> What line Andy, call is there in line 160 of the main do/while loop,
> you've got week old code i think as I've posted two versions.

That was from the version you posted 1 hour ago.

I can only work with what you provide.

-- 
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] Found a new show stopper

2024-03-07 Thread gene heskett

On 3/7/24 11:23, andy pugh wrote:

As has been said, you are not calling the subroutines. I am surprised
that the code even runs.

You have

o

It needs to be

o CALL

What line Andy, call is there in line 160 of the main do/while loop, 
you've got week old code i think as I've posted two versions.


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] Found a new show stopper

2024-03-07 Thread andy pugh
As has been said, you are not calling the subroutines. I am surprised
that the code even runs.

You have

o

It needs to be

o CALL

-- 
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] Found a new show stopper

2024-03-07 Thread gene heskett

On 3/7/24 09:38, gene heskett wrote:
See below> On 3/7/24 05:03, andy pugh wrote:

On Thu, 7 Mar 2024 at 00:30, gene heskett  wrote:



  If there is
any error that stops it, such as a probe trip when not in a probe move,
its all done until shut down, restarted and rehomed.


It really shouldn't need a shutdown and restart.


It did Andy, then I found a note about subroutines in 11.7.4 that is a 
bit confusing. First, one named sub can't call another, but then it says 
it can call itself. So I broke it up into single pieces w/o any nesting 
in the main loop, but haven't gone out to test it yet as the weather is 
a bit damp. Probably more typu's to fix when I do. What I'm tryimg to do 
is locate every 3rd bolthole in a 540mm long 9mm wide linear bearing 
which is clamped in place by printed jigs on a 560mm long cf tube 
measureing 20x20, held in good y alignment by two printed vises with 
opposing movable jaws so it dialed within a thou of straight with the 
mills table. First I go into the counterbore of the screw hole, locate 
that with a spinning probe, then if that works center it and go in 4 or 
5mm to get inside the 3mm hole, find that and record xyz in the array. 
Find the center of the 3mm hole and re-record that. then increment the x 
in both arrays by 60mm and find that hole, wash rinse repeat for 8 
holes. If I can do that, then I change the probe for a 3mm sc mill and 
drill the holes in the cf for 3mm bolts. Then turn it over in the vises 
and do it again since I put another rail on the bottom of the cf tube. 
The printer I'm rebuilding, a tronxy400pro that never worked had all 
that flying weight made out of steel and solid alu and is going to lose 
at least half a pound of flying weight the xy motors won't have to throw 
around...The plain steppers have also been replaced with hanpose 
stepper/servos running on 3x the normal driver voltage, with optical 
encoders feeding the matching drivers. Turning a 40mm/second printer 
into a 400mm/second+ printer. I hope.


To better describe it, if the code is edited and reloaded after an 
error, all the stuff before the first move that has debugging statements 
in it, executes normally but it will not execute past the first machine 
move on the subsequent try until stopped and restarted, rehomed, and the 
code reloaded. Weirdsville... Even w/o errors, it only works once.


Thanks Andy. Take care & stay well.

Cheers, Gene Heskett, CET.


I must be doing something wrong.

Despite the rewrite, if there is an error, it runs just once and will 
not to run again, stopping in o at the 1st machine move, then 
must be shut down, restarted and rehomed, and reloaded. Backplot looks 
great, no error reported on 2nd reload and run, but won't move machine.


gcode attached. Something I'm doing wrong? I can rehome it, move the 
machine from the keyboard, but the gcode can't move it on the 2nd run.


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
( linear_bearings.ngc, copyright 25 Feb 2024 by Maurice E Heskett, CET )
#<_measure>=1. ( zero to drill after changing fr probe to 3mm cutter )
#<_hole_spc> = 60. ( nominal space beteen holes drilled )
#<_xy_spd>  = 15
#<_z_spd>   = 25
( first find starting x y z )
G17 G21 G40 G49 G54 G80 G90 G94 ( setup to use xy arcs, metric, )
( cancel diameter comp,cancel length off set, G54 coordinates system 1, )
( cancel any canned cycles, absolute distances, feed per minute mode )
( setup contact to ground to bearing, put probe in spindle with probe wire )

( NOTE Andy Pugh says this is a valid way to address an array: #[100 + #3] )
( but he didn't mention that debug was broken, so if we want to use it )
( to a global var, we must first copy the #<_gvar> = #[basenum+#50] )
( rather cumbersome proceedure )
(pre-alloocate the bounce vars for floats)
o sub
(allocate vars)
#<_zx> = 0. (for z stuffs)
#<_zy> = 0. (for z stuffs)
#<_zz> = 0. (for z stuffs)
#<_xyx> = 0. (for hole stuff)
#<_xyy> = 0. (for hole stuff)
#<_xyz> = 0. (for hole stuff)
(so first, lets see if it actually works )
#50=0 ( set index to zeroth element )
#[200+#50] =  4 ( zeroth x location for z_check )
#[210+#50] =  1.117 ( zeroth y location for z_check )
#[220+#50] =  -66 ( zeroth height to begin  z search )
#[230+#50] =  9.5 ( zeroth hole xy x location )
#[240+#50] =  1.117 (zeroth holes xy y location )
#[250+#50] =  [-1.75 + #[220+#50]] ( to see if math works)
(debug, init_arrays done)
o endsub

o sub
( now, copy all that to global vars )
#<_zx> = #[200+#50] (z_check x)
#<_zy> = #[210+#50] (z_check y)
#<_zz> = #[220+#50] (z_check z)
#<_xyx> = #[230+#50] (hole_check x)
#<_xyy> = #[240+#50] (hole_check y)
#<_xyz> = #[250+#50] (hole_check z)
o endsub

o sub
(now the 

Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread gene heskett

On 3/7/24 05:03, andy pugh wrote:

On Thu, 7 Mar 2024 at 00:30, gene heskett  wrote:



  If there is
any error that stops it, such as a probe trip when not in a probe move,
its all done until shut down, restarted and rehomed.


It really shouldn't need a shutdown and restart.


It did Andy, then I found a note about subroutines in 11.7.4 that is a 
bit confusing. First, one named sub can't call another, but then it says 
it can call itself. So I broke it up into single pieces w/o any nesting 
in the main loop, but haven't gone out to test it yet as the weather is 
a bit damp. Probably more typu's to fix when I do. What I'm tryimg to do 
is locate every 3rd bolthole in a 540mm long 9mm wide linear bearing 
which is clamped in place by printed jigs on a 560mm long cf tube 
measureing 20x20, held in good y alignment by two printed vises with 
opposing movable jaws so it dialed within a thou of straight with the 
mills table. First I go into the counterbore of the screw hole, locate 
that with a spinning probe, then if that works center it and go in 4 or 
5mm to get inside the 3mm hole, find that and record xyz in the array. 
Find the center of the 3mm hole and re-record that. then increment the x 
in both arrays by 60mm and find that hole, wash rinse repeat for 8 
holes. If I can do that, then I change the probe for a 3mm sc mill and 
drill the holes in the cf for 3mm bolts. Then turn it over in the vises 
and do it again since I put another rail on the bottom of the cf tube. 
The printer I'm rebuilding, a tronxy400pro that never worked had all 
that flying weight made out of steel and solid alu and is going to lose 
at least half a pound of flying weight the xy motors won't have to throw 
around...The plain steppers have also been replaced with hanpose 
stepper/servos running on 3x the normal driver voltage, with optical 
encoders feeding the matching drivers. Turning a 40mm/second printer 
into a 400mm/second+ printer. I hope.


To better describe it, if the code is edited and reloaded after an 
error, all the stuff before the first move that has debugging statements 
in it, executes normally but it will not execute past the first machine 
move on the subsequent try until stopped and restarted, rehomed, and the 
code reloaded. Weirdsville... Even w/o errors, it only works once.


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] Found a new show stopper

2024-03-07 Thread John Allwine
It looks like you’re missing a few calls in this loop. Not sure if that’s your 
problem, but it’s a place to start:

o7 do
o
o (see what its got)
o (move to it)
(put drill hole call here)
#50 = [#50 +1]
o7 while [#50 le 7]


> On Mar 6, 2024, at 5:28 PM, gene heskett  wrote:
> 
> On 3/6/24 15:49, gene heskett wrote:
>> specifically the command to set spindle speed MUST BE LOWERCASE
>> Nothing in a gcode file causing machine motion beyond
>> S1000 will execute. No error messages of any kind either. Found it by 
>> surround the first move with (debug, msg) statements.
>> I have not gone to the new number the spindle syntax because that reference 
>> in the docs is not very clear and doesn't actually explain it that well, at 
>> least to me. Does it require a $ sign in front of the spindle number? My 
>> limited exploration has not been successful at rotating a spindle. Since I 
>> don't have anything that does qualify as a spindle although I've both A and 
>> B axises now that can turn 400 rpms synched to x or y, I would not call then 
>> spindles as their chucks are in fact 3d printed square sockets.
>> The backplot showed the motion trace just fine for either s case. I have 
>> killed it a couple times, but changing the view fixes it.
>> I changed the file back to a lowercase s:
>> s1000
>> and everything then seems to run normally.
>> So the old canary will live. ;o)> But he is certainly surprised.
> 
> Looks like its more than just what looks like a case sensitivity. What its 
> doing is actually only running the attached gcode once. If there is any error 
> that stops it, such as a probe trip when not in a probe move, its all done 
> until shut down, restarted and rehomed. There are two places where one sub 
> calls another.  If there are no errors, it all works. Is that a no-no in 
> terms of error recovery, as in blowing away the call stack?
> 
> Take care & stay well everyubody.
> 
> 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


Re: [Emc-developers] Found a new show stopper

2024-03-07 Thread andy pugh
On Thu, 7 Mar 2024 at 00:30, gene heskett  wrote:


>  If there is
> any error that stops it, such as a probe trip when not in a probe move,
> its all done until shut down, restarted and rehomed.

It really shouldn't need a shutdown and restart.

-- 
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] Found a new show stopper

2024-03-06 Thread gene heskett

On 3/6/24 15:49, gene heskett wrote:

specifically the command to set spindle speed MUST BE LOWERCASE
Nothing in a gcode file causing machine motion beyond
S1000 will execute. No error messages of any kind either. Found it by 
surround the first move with (debug, msg) statements.


I have not gone to the new number the spindle syntax because that 
reference in the docs is not very clear and doesn't actually explain it 
that well, at least to me. Does it require a $ sign in front of the 
spindle number? My limited exploration has not been successful at 
rotating a spindle. Since I don't have anything that does qualify as a 
spindle although I've both A and B axises now that can turn 400 rpms 
synched to x or y, I would not call then spindles as their chucks are in 
fact 3d printed square sockets.


The backplot showed the motion trace just fine for either s case. I have 
killed it a couple times, but changing the view fixes it.


I changed the file back to a lowercase s:
s1000
and everything then seems to run normally.

So the old canary will live. ;o)> But he is certainly surprised.


Looks like its more than just what looks like a case sensitivity. What 
its doing is actually only running the attached gcode once. If there is 
any error that stops it, such as a probe trip when not in a probe move, 
its all done until shut down, restarted and rehomed. There are two 
places where one sub calls another.  If there are no errors, it all 
works. Is that a no-no in terms of error recovery, as in blowing away 
the call stack?


Take care & stay well everyubody.

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
( linear_bearings.ngc, copyright 25 Feb 2024 by Maurice E Heskett, CET )
#<_measure>=1. ( zero to drill after changing fr probe to 3mm cutter )
#<_hole_spc> = 60. ( nominal space beteen holes drilled )
#<_xy_spd>  = 15
#<_z_spd>   = 25
( first find starting x y z )
G17 G21 G40 G49 G54 G80 G90 G94 ( setup to use xy arcs, metric, )
( cancel diameter comp,cancel length off set, G54 coordinates system 1, )
( cancel any canned cycles, absolute distances, feed per minute mode )
( setup contact to ground to bearing, put probe in spindle with probe wire )

( NOTE Andy Pugh says this is a valid way to address an array: #[100 + #3] )
( but he didn't mention that debug was broken, so if we want to use it )
( to a global var, we must first copy the #<_gvar> = #[basenum+#50] )
( rather cumbersome proceedure )
(pre-alloocate the bounce vars for floats)
o sub
(allocate vars)
#<_zx> = 0. (for z stuffs)
#<_zy> = 0. (for z stuffs)
#<_zz> = 0. (for z stuffs)
#<_xyx> = 0. (for hole stuff)
#<_xyy> = 0. (for hole stuff)
#<_xyz> = 0. (for hole stuff)
(so first, lets see if it actually works )
#50=0 ( set index to zeroth element )
#[200+#50] =  4 ( zeroth x location for z_check )
#[210+#50] =  1.117 ( zeroth y location for z_check )
#[220+#50] =  -66 ( zeroth height to begin  z search )
#[230+#50] =  9.5 ( zeroth hole xy x location )
#[240+#50] =  1.117 (zeroth holes xy y location )
#[250+#50] =  [-1.75 + #[220+#50]] ( to see if math works)
(debug, init_arrays done)
o endsub

o sub
( now, copy all that to global vars )
#<_zx> = #[200+#50] (z_check x)
#<_zy> = #[210+#50] (z_check y)
#<_zz> = #[220+#50] (z_check z)
#<_xyx> = #[230+#50] (hole_check x)
#<_xyy> = #[240+#50] (hole_check y)
#<_xyz> = #[250+#50] (hole_check z)
o endsub

o sub
(now the acid test, did it work?)
(debug,lb 48 holenum=#50)
(debug,lb 49 zx=#<_zx> #<_zy> #<_zz>)
(debug,lb 50 xyx=#<_xyx> #<_xyy> #<_xyz>)
(debug,lb 51 #100  #101  #102) 
(debug,show args done)
o endsub 

o sub
( uses hole arrays 230-240-250 but update all for this hole ) 
(#[200+#50] = #100)
(#[210+#50] = #101)
(#[220+#50] = #102)
#[230+#50] = #100 (metric x return from hole_finder)
#[240+#50] = #101 (metric y return from tholefinder)
#[250+#50] = #102 (metric z return from latest g38.2 z-70)
o endsub

o sub
#51 =   [#50+1] ( make 51 into next member of array )
#[210+#51]  =   #101 (propagate current Y)
#[220+#51]  =   #102 (propagate current Z)
#[230+#51]  =   [#100 + #<_hole_spc>] (add hole_spc to x for next hole)
#[200+#51]  =   [#[200+#50] + #<_hole_spc>] (increment z check x spot 
too)
#[240+#51]  =   #101 ( propagate found y)
#[250+#51]  =   #102 ( propagate found z)
o endsub

o sub
(debug,lb zc 76 in z check)
s1000 (set spindle rpms)
(debug,zc spindle speed set 1000)
G1 F1500 z-50 (lift tp clear traveler)
(debug, lb zc 80 lifted to -50)
G1 f1500 x#<_zx> y#<_xyy> (goto location of z check)
G1 F1500 z[#<_zz> +1] (should be a mm above rail)
M4 (start spindle, backwards)
G4 P.3 (give move time to complete)
G38.2 F15 z-70 ( 

[Emc-developers] Found a new show stopper

2024-03-06 Thread gene heskett

specifically the command to set spindle speed MUST BE LOWERCASE
Nothing in a gcode file causing machine motion beyond
S1000 will execute. No error messages of any kind either. Found it by 
surround the first move with (debug, msg) statements.


I have not gone to the new number the spindle syntax because that 
reference in the docs is not very clear and doesn't actually explain it 
that well, at least to me. Does it require a $ sign in front of the 
spindle number? My limited exploration has not been successful at 
rotating a spindle. Since I don't have anything that does qualify as a 
spindle although I've both A and B axises now that can turn 400 rpms 
synched to x or y, I would not call then spindles as their chucks are in 
fact 3d printed square sockets.


The backplot showed the motion trace just fine for either s case. I have 
killed it a couple times, but changing the view fixes it.


I changed the file back to a lowercase s:
s1000
and everything then seems to run normally.

So the old canary will live. ;o)> But he is certainly surprised.

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