Frank Mori Hess | 1 Aug 05:35 2003
Picon
Picon

Re: PC104-DAS16jr/16 callback


On Thursday 31 July 2003 03:06 pm, Muks Raju wrote:
> Hello I continue to have problems with the PC104-Das16jr/16 and comedi.
> I have a program which does acquisition of Analog inputs using the
> callback feature. It is intended to sample every 3ms . On a toshiba
> libretto with a NI AI 16XE50 DAQ the call back is called every 3ms. But
> with the same program on the PC104-DAS16jr/16 the callback is called
> only once in 60ms and hence within a few seconds i get a buffer overrun.
> Any inputs would be much appreciated
>
> Muks

Yeah, that's right.  If you are using the driver's timer mode, that's how 
often it polls the dma transfer.  The polling period could be made 
adjustable without much trouble, but even then the shortest period 
possible would be 1 jiffy (10ms usually).  By the way, you aren't doing 
this from an RT kernel module are you?

--

-- 
Frank

Frank Mori Hess | 1 Aug 05:38 2003
Picon
Picon

Re: Commands for 6024e


On Wednesday 30 July 2003 01:46 pm, Eric Welch wrote:
> I'm an undergrad research assistant with little to do but figure out the
> ins and outs of the NI-6024e board so other people can use it later. 
> I'm running out of impressive things to announce to my superiors, so I
> was thinking working on the drivers for the board to add command
> structure functionality.  So, I was wondering if there are any
> prohibitive reasons why this hasn't been implemented yet by someone
> else, or if no one's just bothered, or if there's been work done on it
> that I can build off of, etc..  I've never looked at device driver code
> before this summer, but I enjoy such new challenges.

What gave you the idea that commands aren't supported for the 6024e?

--

-- 
Frank

Frank Mori Hess | 1 Aug 05:47 2003
Picon
Picon

Re: Counter device


On Thursday 31 July 2003 09:06 am, Guenter Gebhardt wrote:
> Hello,
>
> I am writing a comedi driver for the Meilhaus ME-4000 MIO family. The
> board contains a 8254 counter subdevice. It allows 6 different modes to
> be configured. I looked at comedi.h to figure out what defines are
> available and found the GPCT_ defines. It is hard to match the defines
> against the 8254 modes. Is there a convention or should I choose the
> defines by my own?
>
> Best regards,
>
> Gebhardt

There are a couple little functions in 8253.h that may be helpful, just to 
make sure you are aware of them.  Ultimately, it would be nice to have 
generic support for an 8253/8254 subdevice sort of like what we have for 
the 8255 (see 8255.c).

--

-- 
Frank

Muks Raju | 1 Aug 06:17 2003
Picon

Re: PC104-DAS16jr/16 callback

Hello Frank, thanks for the reply. Well 10ms is of no use to mesince I have
to have a scan every 5ms. So i guess ill have to abandon the "command"
method and use insn to read the channels.
Am i using this from a RT kernel module? Yes I am.. well I dont have a RT
scheduler running but I have comedi compile with RTAI support and I use rt
functions in this module. Why do you ask? is there something I should be
aware of?

Thanks

Muks

----- Original Message ----- 
From: "Frank Mori Hess" <fmhess <at> users.sourceforge.net>
To: "Muks Raju" <muks <at> ieee.org>; <comedi <at> comedi.org>
Sent: Thursday, July 31, 2003 11:35 PM
Subject: Re: PC104-DAS16jr/16 callback

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 31 July 2003 03:06 pm, Muks Raju wrote:
> Hello I continue to have problems with the PC104-Das16jr/16 and comedi.
> I have a program which does acquisition of Analog inputs using the
> callback feature. It is intended to sample every 3ms . On a toshiba
> libretto with a NI AI 16XE50 DAQ the call back is called every 3ms. But
> with the same program on the PC104-DAS16jr/16 the callback is called
> only once in 60ms and hence within a few seconds i get a buffer overrun.
> Any inputs would be much appreciated
>
(Continue reading)

mirko.fischer | 1 Aug 12:04 2003
Picon

error while compiling cmd.c

Hello! 

I want to use directly comedi commands.But while compiling cmd.c the following 
error occured: 

Has somebody a tip whats wrong? 

I'm using a NI-PCI 6023E DAQ-Device with Suse 8.0. 

Thanx 

Mirko 

linux:~/comedilib-0.7.20/demo # c++ cmd.c -lcomedi -o cmd  
cmd.c: In function `int prepare_cmd_lib(comedi_t *, int, comedi_cmd *)':  
cmd.c:192: warning: `double' used for argument 4 of  
`comedi_get_cmd_generic_timed(comedi_t *, unsigned int, comedi_cmd *, unsigned  
int)'  
cmd.c: In function `int prepare_cmd(comedi_t *, int, comedi_cmd *)':  
cmd.c:265: warning: assignment to `unsigned int' from `double'  
/tmp/ccHSg0NZ.o: In function `main':  
/tmp/ccHSg0NZ.o(.text+0x21): undefined reference to `parse_options(int, char  
**)'  
/tmp/ccHSg0NZ.o(.text+0x2c): undefined reference to `filename'  
/tmp/ccHSg0NZ.o(.text+0x48): undefined reference to `filename'  
/tmp/ccHSg0NZ.o(.text+0x75): undefined reference to `n_chan'  
/tmp/ccHSg0NZ.o(.text+0x93): undefined reference to `aref'  
/tmp/ccHSg0NZ.o(.text+0xa1): undefined reference to `range'  
/tmp/ccHSg0NZ.o(.text+0xb4): undefined reference to `channel'  
/tmp/ccHSg0NZ.o(.text+0xd8): undefined reference to `subdevice'  
(Continue reading)

Klaas Gadeyne | 1 Aug 16:11 2003
Picon
Picon

Re: Counter device

> > I am writing a comedi driver for the Meilhaus ME-4000 MIO family. The board
> > contains a 8254 counter subdevice. It allows 6 different modes to be
> > configured. I looked at comedi.h to figure out what defines are available and
> > found the GPCT_ defines. It is hard to match the defines against the 8254
> > modes. Is there a convention or should I choose the defines by my own?
>
> The Comedilib documentation describes how counter devices are
> supposed to work.

From
<http://people.mech.kuleuven.ac.be/~bruyninc/comedi/html/x597.html#COUNTERTIMER>

"Note that this configuration is only useful if the counting has to be
done in software. Many cards offer configurable counters in hardware; e.g.,
general purpose timer cards can be configured to act as pulse generators,
frequency counters, timers, encoders, etc."

Am I wrong if I'm saying that comedi has not yet defined an API for those
devices?

We have tried to define an API for those cards.  See previous posts about
the NI 660x driver.  Maybe you'll find them useful and can provide us with
shortcomings about the API that is solely based on the NI boards.

<https://cvs.comedi.org/pipermail/comedi/2003-July/004807.html>

Best regards,

Klaas
(Continue reading)

David Schleef | 1 Aug 20:36 2003

Re: error while compiling cmd.c

On Fri, Aug 01, 2003 at 12:04:12PM +0200, mirko.fischer <at> s2000.tu-chemnitz.de wrote:
> Hello! 
>  
> I want to use directly comedi commands.But while compiling cmd.c the following 
> error occured: 
>  
> Has somebody a tip whats wrong? 

Look at comedilib/demo/Makefile to see how demo/cmd is built.

dave...
Bernd Porr | 2 Aug 03:04 2003
Picon

compiling external kernel modules (comedi.org)

Hi all,

I'm trying to compile comedi on 2.6-test2. The very naive way (with 
configure) does not work (as expected). However, comedi conforms 
(mainly) to the kernel makefile convention. So I tried this:

make -C /usr/src/linux-2.6.0-test2 
SUBDIRS=/home/bp1/c/usb/2.6/comedi/comedi/ V=1

make -f scripts/Makefile.build 
obj=/home/bp1/c/usb/2.6/comedi/comedi//drivers
scripts/Makefile.build:27: kbuild: 
/home/bp1/c/usb/2.6/comedi/comedi//drivers/Makefile - Usage of 
export-objs is obsolete in 2.5. Please fix!
make -f scripts/Makefile.build 
obj=/home/bp1/c/usb/2.6/comedi/comedi//kcomedilib
scripts/Makefile.build:27: kbuild: 
/home/bp1/c/usb/2.6/comedi/comedi//kcomedilib/Makefile - Usage of 
export-objs is obsolete in 2.5. Please fix!
make -f scripts/Makefile.build obj=arch/i386/boot arch/i386/boot/bzImage
make -f scripts/Makefile.build obj=arch/i386/boot/compressed \
                                IMAGE_OFFSET=0x100000 
arch/i386/boot/compressed/
vmlinux
Kernel: arch/i386/boot/bzImage is ready
  Building modules, stage 2.
make -rR -f scripts/Makefile.modpost
  scripts/modpost vmlinux drivers/net/pcmcia/3c574_cs.o 
drivers/net/pcmcia/3c589
_cs.o drivers/net/8139cp.o drivers/net/8139too.o drivers/net/8390.o 
(Continue reading)

Bernd Porr | 2 Aug 13:53 2003
Picon

Re: compiling external kernel modules (comedi.org)

Ok. Thanks. Now the bug is that comedi cannot find the file "Rules.make" 
which is apparently no longer there in 2.6. Is it right that the rules 
are now integrated in the corresponding makefiles?

Can you recommend me a Makefile which I can take as a template? Comedi 
uses some sort of autoconfig and I have to append then the "rules" to 
the automatically generated makefile.

Another thing: can a prevent the kernel of generating the "Stage 2"? It 
would be nice if the kernel doen't need to write to it's own directories 
if it compiles external modules. The best thing would be that one could 
compile external modules as a normal user and then only at the end 
becomes root. In my case this would be convenient as my home is a NFS 
directory which does not allow compiling as root. However the kernel 
modules at the end are stored on a root writable directory.

/Bernd

--------------------------------------------------------------------------------
removed the Rules.make includes from the comedi Makefiles:

2.4.21: only to test. Comedi cannot compile since an evil programmer has 
removed Rules.make.

snoopy:/home/bp1/c/usb/comedi/comedi# make -C /usr/src/linux 
SUBDIRS=$PWD V=1 modules
make: Entering directory `/usr/src/linux-2.4.21'
make -C  /home/bp1/c/usb/comedi/comedi CFLAGS="-D__KERNEL__ 
-I/usr/src/linux-2.4.21/include -Wall -Wstrict-prototypes -Wno-trigraphs 
-O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe 
(Continue reading)

Bernd Porr | 2 Aug 14:27 2003
Picon

Re: compiling external kernel modules (comedi.org)

Sam,

>You will NOT succeed creating a single simple makefile supporting both
>2.4 and 2.6. On the other hand the Makefile are so trivial that creating
>two distinct version should be acceptable?
>  
>
Of course it's acceptable. And as long as comedi is not part of the 
official kernel tree the maintainers have to write configures which take 
care of the different kernel versions. :-(

>PS. Please do not cc: subscription only mailing lists.
>
I'm subscribed to those lists. Both, "comedi" and "kernel-devel" are 
interested in this, I think.

/Bernd

--

-- 
http://www.cn.stir.ac.uk/~bp1/
mailto:bp1 <at> cn.stir.ac.uk

Gmane