On Friday 31 May 2013 00:10:22 andy pugh did opine:

> On 30 May 2013 14:40, Gene Heskett <[email protected]> wrote:
> > I sent a decent part of yesterday scribbling logic diagrams w/o coming
> > up with anything that looks like it would work.  The truth tables
> > seem to be mutually exclusive.
> 
> LUT5 is just a lookup, not a truth table, so every possible
> combination of inputs has an output.
> 
> You may need to create inputs such as spindle-was-running and
> spindle-was-stopped to get what you need.

Andy, here is what I wound up adding in the .hal file:

loadrt  and2                            count=7         # and2.4, and2.5 for 
off lockouts
loadrt  oneshot                         count=1         # delay to lockout 
spindle on after off
loadrt  edge                            count=1         # to detect an on and 
clock the flipflop
loadrt  flipflop                        count=1         # to control 
motion.spindle-on targets
loadrt  not                             count=1
addf    abs.5                           servo-thread    # 
addf    abs.4                           servo-thread    # make pyvcp tach read 
upscale in reverse
addf    oneshot.0                       servo-thread    # to detect spindle is 
running
addf    and2.4                          servo-thread    # to interlock off delay
addf    not.0                           servo-thread    # need a true for 
motion.spindle-off
addf    edge.0                          servo-thread    # detect a spindle-on 
with
addf    flipflop.0                      servo-thread    # to sequence the 
spindle-on signal
setp    oneshot.0.width                 0.1             # seconds for it to 
time out
net     spindle-is-running              oneshot.0.out
net     spindle-is-stopped              oneshot.0.out-not               
and2.4.in1
setp    edge.0.in-edge                  false
setp    edge.0.out-width-ns             40000                           # in 
nanoseconds!
net     spindle-on-edge                 edge.0.out                      
flipflop.0.clk
# this might be where we plug in the braking delay lockout
# net   spindle-enable                  motion.spindle-on               
pwmgen.0.enable         pid.0.enable
net     spindle-enable                  motion.spindle-on               
edge.0.in               and2.4.in0      not.0.in
net     spindle-lockout                 and2.4.out                      
flipflop.0.data
net     spindle-off                     not.0.out                       
flipflop.0.reset        # unconditional off
net     spindle-stop                    flipflop.0.out                  
pwmgen.0.enable         pid.0.enable

Before I did something to the MC60 controller, responses to axis gui 
mouse clicks or to mdi commands were as near to instant as before.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
My views <http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml>
"Well, if you can't believe what you read in a comic book, what *___can*
you believe?!"
                -- Bullwinkle J. Moose [Jay Ward]
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to