Re: Connection of hardware




johnm-at-slmd.com wrote:

> >> I forsee a bunch of coding I'll have to do to obtain the spindle speed.
> >> If I ask for 1300 rpm, it doesn't really have to be that exactly as long
> >> as I know what it is (e.g., 1304.67 rpm) to coordinate threading tasks.
>
> > I also want to use emc for lathe tasks and need the threading and high
> > speed spindle coordinated with z.  Don't have a clue how to do it.
>
> I only see here the problem of reading the encoder output that tells us
> the speed of the spindle -- altering the way one of the Y axis is used
> (since I only need X and Z) to show the resulting velocity (rather than
> position) and not have closed-loop PID servo control enabled for it.

Well, that may or may not be so easy.  An encoder counter will just count
up, then overflow, at (I think) 2 ^^ 24 on the STG card.  So, with some
code that takes care of the overflow, you could just compare the counts
from last sample and this sample, and get rough RPM.  Or, keep a ring
buffer of N samples, and do the computation from, say, the last 10 or
50 samples, and you'd have a nice, stable number to compute RPM from.
This OUGHT to work, and wouldn't be real hard to hack into the
code that reads the STG card.  then you need to set up structures in
the shared memory to pass this info out from the RT section to the
user interface.

> > I'm not convinced that you need opto isolation on the quadrature
> > input to the stg board.  I'd use isolation on all the input signals.  And
> > use sockets so that I could replace smoked isolators.

Well, if cost and time are no object, then, yes, it would not be a bad idea.

> Sockets suggests home-made electronics -- don't I/O modules have fuses?
> Jon says one only needs opto-isolation only on output signals. Transient
> EMF
> experts out there please clearify the rules!

Well, I start and stop motors all over the place and have never had any
quirks with encoder redings or any other signals.

> > Jon E. had some breakout boards.  We really should work up a general
> > purpose stg interface board plan and get some made up for all the
> signals.

Yup.  The breakout boards should be real easy.  about 2 x 4" single-side
board, 1 50-pin header, and 10 5-pos screw terminal sections from
Phoenix contact.  These things are about $1.25 each, I think.  Still
a lot cheaper than buying the complete units from RDI and others, they
charge $40+ for these things.

If a few people want to do isolated input boards for the limit switches
and the encoders, I might be willing to design those and make up kits
for everyone.

And, then there is the safety / aux control module, which I have already
designed, but I haven't made a prototype printed board.  The circuitry
is checked out, as I have been using a wire-wrapped version for almost
a year.

Jon




Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact