On Wednesday 19 June 2013 16:58:37 Gene Heskett did opine:

> Greetings;
> 
> My own twisted logic says I should use an edge module, firing a oneshot
> to develop the stop signal where there is not one from the G33.1 cycle.
>  My current .hal has a reverse sequencer that works fine, but its
> totally dependent on having the M5 in the code to trigger the stop
> sequence.
> 
> It does this directly by resetting the flip-flop that controls the rest
> of the analog chain to the PID when motion.0.on goes false.  At that
> point, a one shot watching phaseA of the encoder functions as a timeout
> clock, re- enabling the spindle_switch by clocking the state of
> motion.0.spindle-on into the flip-flop,  If it was a real stop, its ok,
> but if its true again when the timeout runs out, the analog chain to
> the spindle is re-enabled. The stop in any event must be long enough to
> reset the controllers safety start logic by cutting off the pwmgen long
> enough to do this, so the actual stop condition will probably be long
> enough to actually see that it has stopped for a good fraction of a
> second.
> 
> So if I use an edge to detect the rise of the motion.0-spindle-reverse,
> which will trigger another timeout, a .010 second or so, during which
> time the motion.0.spindle-on is gated off, that will fall thru and do
> the stop until the encoder is silent for enough milliseconds to
> indicate the stop had been done.
> 
> But I'll have to duplicate that, sensing the falling edge, triggering
> the one shot again to initiate the stop from the reverse state to turn
> it around and run fwd again.
> 
> Then finish it off with yet another flip-flop beside the one that gates
> the control signals, so that when that controlling one shot times out,
> the status of motion.0.spindle-reverse is clocked out to
> parport.0.pin_16 to complete the chain & actually tell it to reverse,
> or not.
> 
> That is two edge modules watching motion.0.spindle-reverse, 2 more
> oneshots, an AND or OR as the case may be to bring the oneshots
> together, and another flipflop to steer the parport "reverse" pin.
> 
> I'm going to need some excedrin before rockhopper prints me another hal
> map that works.  Sure thing :(
> 
> Can anyone short circuit and simplify this?
> 
> Thanks.
> 
> Cheers, Gene

I think I got the sink or swim message, but after nearly 2 days putzing 
around, I got it.  My .hal file is now 290 lines though.  I can now fire up 
a loop that increments the Z run at 32 tpi by half a turn each time, then 
rigid tapped a brass bullet seater to put a pin in the center, but ran out 
of bit to reach and taper the pin.  I also scraped and custom fitted it to 
that particular bullets nose, which should stop a lot of the nose damage 
and make it shoot even more accurately.

So now, a canned routine like G33.1 that doesn't stop before reversing 
isn't going to hang it up.

Disadvantage? running 2x the rpm, doesn't make a lot of difference in run 
time, as it coasts also 2x as far at 200 rpms as it does at 100 rpms.  Next 
I suppose I'll have to use the last pin on my parport to flip a relay to 
reconfigure the braking R's at low speeds.  Whats safe for the motors 
magnets at 1500 spindle rpm, isn't very effective below 500 rpms.
  
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>
"Hey Ivan, check your six."
-- Sidewinder missile jacket patch, showing a Sidewinder driving up the 
tail
 of a Russian Su-27
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to