Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Sep 1996 06:16:10 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        dayton@holiday.sci.brooklyn.cuny.edu (Dayton Clark)
Cc:        questions@freebsd.org, pencil@holiday.sci.brooklyn.cuny.edu
Subject:   Re: LabPC+ problem
Message-ID:  <199609181016.GAA24326@hda.com>
In-Reply-To: <199609171416.OAA27952@holiday.sci.brooklyn.cuny.edu> from "Dayton Clark" at Sep 17, 96 02:16:56 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> We're using the labpc driver with FreeBSD 2.1R.  The system is a
> straight forward 486/33 with ISA bus.  The board is a LabPC+.
> 
> We are doing digital output and analog input simultaneously.  When we
> read a single channel (channel 0) it works fine.  When we scan
> channels 7 - 0 we seem to get channel 0 values for all channels.  Our
> application is not very demanding as to sampling rate.
> 
> We did have to defeat the multiple open lockout to open the device
> twice.  Is the the likely cause of the problem? :)

I assume you defeated the multiple open lockout to permit you
to open the digital and analog channels?  That should be OK.

The board and driver should support scanning - I'm using
it in an application at a clients to scan in five channels.  Check
the minor number to make sure you are scanning from the correct
device - it has a field to set the upper bound on the scanning
sequence.  Then use "dd" to read from that device and see if you
are getting all channels, eliminating problems with your user
code and pointing the finger at the driver.
Finally, see if there is a boundary issue with eight channels.

> If we are to venture further into the driver, do you have any words of
> wisdom on as to how to overcome the problem?  A specific question is:
> why is the multi-open lockout necessary?

The multi open lockout is to prevent you from trying to open the device
in, for example, scanning mode where it will scan through a channel
list and also in fixed-channel mode where you read a single channel.

The driver would have to be made a lot smarter than it is to handle
the mode switching that would be required to reprogram the board on
a transfer-by-transfer basis to support that, and though it could be
done it is at least at first analysis probably a bad idea.

The fact that the driver locks out simultaneous open for digital
analog is a restriction that could be removed by changing
"lockout_multiple_open" and testing the change.  That is a sensible
improvement.

Now, for honesty: the version of the driver I have is changed
to pull some common declarations into a separate header to permit
sharing with some other drivers I have.  I don't think that should
affect you.

-- 
Peter Dufault               Real-Time Machine Control and Simulation
HD Associates, Inc.         Voice: 508 433 6936
dufault@hda.com             Fax:   508 433 5267



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