[Coco] How did you learn to program?

Gene Heskett gheskett at wdtv.com
Thu May 30 11:14:32 EDT 2013


On Thursday 30 May 2013 10:38:57 John W. Linville did opine:

> On Wed, May 29, 2013 at 06:02:27PM -0400, Gene Heskett wrote:
> > On Wednesday 29 May 2013 18:01:52 John W. Linville did opine:
> > > On Wed, May 29, 2013 at 02:42:18PM -0400, Gene Heskett wrote:
> > > > On Wednesday 29 May 2013 14:41:44 Aaron Wolfe did opine:
> > > > > An interesting survey/study here:
> > > > > 
> > > > > http://caseorganic.com/how-did-you-learn-to-program
> > > > > 
> > > > > CoConuts, represent! :)
> > > > 
> > > > Just did, now we'll see how much new spam I get...
> > > 
> > > Arranging cards on a Jacquard loom doesn't count, Gene... :-)
> > 
> > Oh, pray tell what does then?
> 
> Spinning gears on a Difference Engine?? :-)

I'm sorry, and I may be ancient, but Charles was still before my time.  But 
I did learn right quick that you don't let greenhorns try to use a Marchant 
Calculating machine, it ran for about 4 days doing a simple (to me) divide.  
Seems you were supposed to start the division at the MSB of the number to 
be divided.  I never touched it again & eventually, 7 or 8 years later 
bought a TI SR51, which taught me algebra.  That is one thing the TI 
calculators have down to a Just Works(TM) state since the start of the 
70's.  To this day I haven't learned how to efficiently use an RPN 
calculator.

Right Now, I could sure pick the brain of someone who can look at a logic 
problem, and come up with the least hardware to do it, because what I am 
doing isn't hardware, but software logic modules that can be chained 
together in a configuration file.

I have a oneshot watching the encoder pulses coming from a hardware encoder 
on a lathe spindle, retriggerable to its true (or false as programmed) as 
long as the spindle is turning more than 10 degrees a second.

I have a signal that when true, starts the modules that drive the spindle 
motor now.  Or stops them when it goes false.

But, since its generally considered to be poor form to tell a motor thats 
turning 7k rpms to stop & reverse to 7k rpms in the other direction, as it 
wants to break the mirrors and let all the smoke out (the smoke will come 
from a pair of 8 ohm, 20 watt resistors sucking up a kilowatt from the 
motor for a few seconds at a time).

So I have to use the output of this one shot to block the on signal from 
going true again until the spindle has come to a full stop.  Not waiting  
will likely blow several devices in the controller in order to protect the 
9 amp circuit breaker. Murphy's Law etc. :)

The motor is a 1 horse, out of a cheap treadmill, but its 4x stronger than 
the OEM motor, and geared down about 3x what the standard motor was.

So, I need logic to make a flipflop set of triggers, with the output of the 
flipflop being sent to where the 'on' signal normally gets sent to.  Logic 
that is initially off at program startup.

So an 'on' + oneshot timeout, will start the motor at the selected speed.
And an 'off' unconditionally stops it.  And any further 'on' will be 
blocked until the oneshot times out, indicating that the spindle has indeed 
stopped.

Something is taking shape in my mind, but any additional insight would be 
helpful.

Thanks.

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>
Short people get rained on last.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.



More information about the Coco mailing list