Coding for RTLinux

I have a program that I have written and expanded the past 10 years using 
TurboPascal for DOS which performs data acquisition and real time feedback 
control using analog inputs into a data acquisition board.  It did not use 
a "driver" but had inline code to access the board.  I decided it was time 
to move to a PCI card and update the code to a multitasking OS.  I had 
chosen RTLinux (with which we have some local experience, just not 
mine).  Our earlier experience with RTLinux was with Comedi and Perl.  This 
will require translating the Pascal code to C and changing the hardware 
specific code for the new board(s).  Support for the older ISA board and 
other boards we have would be nice.  A programmer started this but had 
trouble getting the comedi driver to compile without a large number of 
unresolved externals (was that incorrect directories?).  He then attempted 
using a non comedi driver but the driver failed to recognize the 
board.  The board is recognized now, and he has changed the driver to make 
it RTLinux compatible.  At this point I am reevaluating our approach since 
there is still so much to be done.  That is, do we write hardware 
interfacing code with 3 versions for the 3 boards, or again try to work 
with comedi for the boards?  My needs are:

1.  Perform triggered scan (interrupt driven at 1 kHz to 16 kHz) DMA analog 
input of 2 to 4 channels.

2.  Single channel, single value analog output at the same rate as the scan 
rate.

3.  Minimum delay for the first analog value of each scan since its value 
determines the analog output.

4.  Use the existing boards I have.  They are:
         ComputerBoards PCI-DAS1602/16
         National Instruments PCI-MIO-16E-1
         Data Translation DT2821 and 21-EZ

5.  Occasionally set some bits of the ComputerBoards CIO-DIO48 or PCI-DIO96.

I do not need all of the features of the comedi drivers such as DMA 
AO.  The board setup for the DataTranslation boards is pretty easy.  I am 
comfortable doing that, but the PCI discovery looks like no fun to have to 
do again (for the NI board), though, and I have not programmed any code 
myself (my programmer has) for PCI boards.

Does anyone have thoughts on how well comedi can do the above or how much 
more tweaking there might need to be for comedi?  Our previous experience 
with comedi and the DataTranslation driver was that two years ago the mode 
we wanted was not working, for example.  The Perl program was for the NI 
board.  I appreciate any comments.

Ed Lankford

Received on 2002-11-25Z19:29:14