Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 1997 07:20:28 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        nbc@vulture.dmem.strath.ac.uk
Cc:        freebsd-hackers@freebsd.org, nbc@neophyte.dweeb.net
Subject:   Re: FreeBSD As Motor Controller?
Message-ID:  <199704291120.HAA19011@hda.hda.com>
In-Reply-To: <199704290032.BAA00916@neophyte.dweeb.net> from "nbc@vulture.dmem.strath.ac.uk" at "Apr 29, 97 01:32:53 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> I am currently in the process of implementing an embedded motor control
> system using a well know real-time UNIX, which has turned out to
> be slightly overkill. The system is soft real-time, which made
> me wonder if FreeBSD would be up to the job - I envisage a stripped
> down system, running on PC/104 hardware (already tested with F/BSD),
> the drivers residing at device level, preferably in LKM format.
> 
> At the moment we are using stepper motors, although this may change
> in the future, driven by pulses generated from an I/O board on the
> ISA bus. My major concern with FreeBSD is interrupt latency, which
> is excellent with the current system. Given that we are using 100MHz
> Cyrix 586 CPUs, I'd appreciate it if anyone could give me a ballpark
> figure on the latency, and indeed the typical variations in such one 
> would expect from a lightly loaded system, or perhaps some way to 
> determine this for myself. 

I did this back in 386bsd by running the clock tick at 100 * HZ
and microstepping the motor outside the OS (call the regular OS
tick at HZ).  Don't do much, and don't use any kernel services - this
is OK if you're moving through a table and poking out a value.
If you have a spare counter you can use that to detect
overruns by loading up your deadline + 10% and checking for countdown.
If you don't need your speaker you can probably use that.

I was also running two servos off the interval clock of an A-D.
Again, I had the ability to detect clock overruns - this is important
so that you can prove that you're doing what you think you're doing.

This was on a 20Mhz 386SX with 4MB RAM and a 40MB disk.

-- 
Peter Dufault (dufault@hda.com)   Realtime Machine Control and Simulation
HD Associates, Inc.               Voice: 508 433 6936



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