Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Sep 2001 10:30:15 -0700
From:      Bakul Shah <bakul@bitblocks.com>
To:        Bart Kus <bsd@shell-server.com>
Cc:        hackers@freebsd.org
Subject:   Re: precise timing 
Message-ID:  <200109301730.NAA29134@thunderer.cnchost.com>
In-Reply-To: Your message of "Sun, 30 Sep 2001 10:18:01 CDT." <200109301010.07784@EO> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 	On a totally unrelated subject to my sio.c message, I have a second problem. 
>  I've built a computer-controlled drill, that is controlled via the parallel 
> port.  This drill uses stepper motors, at 1/2 step.  My driver software 
> implements a maximum-acceleration control algorithm that ensures that at any 
> point in time, any axis will not experience more than X m/s/s of 
> acceleration.  This keeps the drill from self-destructing. :)  Unfortunately, 
> it means I need access to a very precise timing source to issue the step 
> instructions to the motor control board.

Are you controlling the rotation speed of the drill or the
x,y,z position?  I'd guess  the latter.  Don't you also need
guaranteed real time response (which FreeBSD won't provide
you)?  I suppose if you are controlling the position (and not
the velocity) RT response won't be too critical.  At any rate
you are better off writing a device driver which can run
timing critical code while blocking out all other interrupts.
Or else between the time you measure time and supply the next
pulse a higher prio interrupt handler else may sneak in.  As
was suggested you may want to consider a dedicated cpu based
controller.  Thre are a number of solutions for hobbyists
(such as the handyboard, see www.handyboard.com).

Is this a totally homebrew drill or something from a kit?
I'd be interested in details (probably better offline since
the interection of freebsd s/w hackers & h/w hackers is
tiny).

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109301730.NAA29134>