Where's the actual homing routine?

Was just thinking of this on a walk...

Can we have a combination of HAL and .ngc be set to this:
Logic #1:
 if (button & !isProbing), then set isProbing=TRUE, execute myProbe.ngc, and 
set isProbing=FALSE when it returns
and Logic #2:
if(!button & isProbing), then issue a STOP (same as pressing the STOP button), 
and isProbing=FALSE

So if it's probing and the button is released, then it stops the current 
G-code, and myProbe.ngc is the only possible g-code that could ever be running 
to stop.   If it's a STOP not a PAUSE, the .ngc should just forced to exit and 
be done, right?

Can a button press do multiple operations of setting an isProbing signal and 
running an .ngc?  Can it wait for the .ngc to finish before clearing isProbing, 
or can the .ngc code clear isProbing somehow (I don't see how).  Or, I guess 
instead of that in logic #1 you'd have a third logical condition:

if (isProbing & !runningGCode (whatever that signal is)) isProbing=FALSE

If you run an .ngc, does it unload and reload the current user G-Code design?  
Because some stuff I have literally takes minutes to load up.  That would be an 
absolute deal-breaker.

Danny

---- andy pugh <bodge...@gmail.com> wrote: 
> On 25 August 2016 at 17:22,  <dan...@austin.rr.com> wrote:

> But, just to complicate things, I'd really like to have this deadman, so you 
> must hold down the Probe-Z button or it will abort the process immediately 
> and fail to set the Z-home.

You could consider driving motion.enable to false. Though that might
over-react.

So, the setting sequence sets a digital output to true, and then
motion.enable is held true only if the switch is also true.

Truth-table

DIO  Button motion.enable
0         0        1
0         1        1
1         0        0
1         1        1

It's (Button OR NOT(DIO)) which can be done with "or2"and "not" HAL
functions, but I think I would use a LUT5 so that it is easy to expand
and add other functions.

For example, if you use LUT5 you can feed the output back into one of
the inputs to make the logic state-aware.

LUT5 version

motion.enable(in)  DIO   Button  motion.enable(out)
          0                 0         0                  1
          0                 0         1                  1
          0                 1         0                  0
          0                 1         1                  0
          1                 0         0                  1
          1                 0         1                  1
          1                 1         0                  0
          1                 1         1                  1

With this logic motion.enable "sticks" false until the DIO pin is
reset to false.

The homing code needs to re-set the digital pin to 0 on completion.

-- 
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, 1916

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to