From owner-freebsd-hackers Mon Oct 6 12:57:40 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA23529 for hackers-outgoing; Mon, 6 Oct 1997 12:57:40 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from hda.hda.com (hda-bicnet.bicnet.net [208.220.66.37]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA23516 for ; Mon, 6 Oct 1997 12:57:32 -0700 (PDT) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id PAA12422; Mon, 6 Oct 1997 15:08:42 -0400 (EDT) From: Peter Dufault Message-Id: <199710061908.PAA12422@hda.hda.com> Subject: Re: A world of unexplored pain. In-Reply-To: from mdean at "Oct 5, 97 12:21:38 pm" To: mdean@best.com (mdean) Date: Mon, 6 Oct 1997 15:08:38 -0400 (EDT) Cc: hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > me to use some dedicated controller board) if that was all I wanted... I did something like this in 386bsd days for a combustion experiment. I ran the clock tick at 100 times HZ, and called an outside of the OS ticker at that rate and the OS every 100 times. This ticker was driving a stepper motor controlled throttle which it was microstepping. Every N times (I think about 5 seconds, so we're talking about N=500) it would also calculate a servo update for the throttle from sensors read in an A-D board. I used the clock on the A-D board to watch for lost ticks by setting it for something like (N + fudge) times the tick interval and verifying it wasn't pending when I got to the control. Communication with this "virtual board" was via a regular device driver that could set up profile schedules and so on via ioctls. We could telnet into the box, display status in a remote xterm, etc, without screwing things up. It was a hack but worked well. Things have grown a lot since then. -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval