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

Reply via email to