Presentation and some questions.

18 views
Skip to first unread message

"Víctor E."

unread,
May 11, 2012, 8:28:52 AM5/11/12
to comed...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi guys, I'm new to comedi and to this list, my name is Víctor, I'm
working on my PFC for USAL universuty in Salamanca, Spain, and I've
some questions related to comedi.

Here are the questions, How comedi manages multiple asynchronous
adquisition? I mean, say that for example I have a NI-6221 board with
multiple subdevices that can made command adquisition, is comedi
capable of working with more than one subdevice at the same time? If
so how can I do it? Can I get a diferent file descriptor for each
writable/readable subdevice?

To get familiar with comedi, I also worked on a small project for
CUSLVI (Concurso Universitario de Software Libre VI) called Freeacq, I
did some code for listing devices and subdevices, and for doing some
tests (Still not finished) and a small acquisition demo using async
commands , the plan is to create a graphical/console application[s]
that can deal with acquisition devices using comedi. Also I modified a
sysrescuecd iso image including comedilib and the comedi drivers with
a 32 and 64 bit kernel, that maybe can be usefull for some users of
this list.

The code and the iso can be found here:
https://forja.rediris.es/projects/cusl6-freeacq/
In this link I have a blog (In spanish) related with Freeacq:
https://freeacq.wordpress.com


Thanks for your support, and sorry my typos.
- --
Víctor Enríquez
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+tBgQACgkQTYuKZ2p/rfBI3wCfUtymYE9jDnHUkFjMFU2ULaZr
tN8An13V5n4hi1r3aLKvjIdNlQs+Qquk
=Mg5X
-----END PGP SIGNATURE-----

Ian Abbott

unread,
May 11, 2012, 9:06:13 AM5/11/12
to comed...@googlegroups.com
Hi Victor,

On 2012-05-11 13:28, "Víctor E." wrote:
> Hi guys, I'm new to comedi and to this list, my name is Víctor, I'm
> working on my PFC for USAL universuty in Salamanca, Spain, and I've
> some questions related to comedi.
>
> Here are the questions, How comedi manages multiple asynchronous
> adquisition? I mean, say that for example I have a NI-6221 board with
> multiple subdevices that can made command adquisition, is comedi
> capable of working with more than one subdevice at the same time? If
> so how can I do it? Can I get a diferent file descriptor for each
> writable/readable subdevice?

Yes, but you have to open the other descriptors using different filenames.

The main file /dev/comedi0 (or whatever number) only lets you set up
asynchronous acquisitions on the default 'read' or default 'write'
subdevice. But there are subdevice-specific files, e.g.
/dev/comedi0_subd0, /dev/comedi0_subd1, etc., one for each subdevice
that supports asynchronous acquisition.

Some devices may have limited resources (such as shared timers) that
prevent multiple commands being set up at once.

> To get familiar with comedi, I also worked on a small project for
> CUSLVI (Concurso Universitario de Software Libre VI) called Freeacq, I
> did some code for listing devices and subdevices, and for doing some
> tests (Still not finished) and a small acquisition demo using async
> commands , the plan is to create a graphical/console application[s]
> that can deal with acquisition devices using comedi. Also I modified a
> sysrescuecd iso image including comedilib and the comedi drivers with
> a 32 and 64 bit kernel, that maybe can be usefull for some users of
> this list.
>
> The code and the iso can be found here:
> https://forja.rediris.es/projects/cusl6-freeacq/
> In this link I have a blog (In spanish) related with Freeacq:
> https://freeacq.wordpress.com

When it's finished (or at least usable), send a reminder so we can add a
link to the Comedi Applications page:

http://www.comedi.org/applications.html

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abb...@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-

"Víctor E."

unread,
May 11, 2012, 9:39:39 AM5/11/12
to comed...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/11/2012 03:06 PM, Ian Abbott wrote:
> Hi Victor,
>
> On 2012-05-11 13:28, "V�ctor E." wrote:
>> Hi guys, I'm new to comedi and to this list, my name is V�ctor,
Great, thanks! , I'll let you know about it.

- --
V�ctor Enr�quez
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+tFpsACgkQTYuKZ2p/rfBB+QCfT9xP7mkIfydqLRx3iUEPEYG2
lMwAoMS/dBE3XA1giJkCn6WIxzKLMZr3
=rPTN
-----END PGP SIGNATURE-----

Bernd Porr

unread,
May 20, 2012, 11:17:01 AM5/20/12
to comed...@googlegroups.com
I've completely forgotten about this. I was wondering how comedi2py can
work together with the comedi python API, for example using comedi2py to
record/plot sensor data and then being able to use the comedi python API
to send out a control signal via analogue out or PWM. Well, that solves
it obviously.

comedi2py uses now secretly /dev/comedi0_subd0 for the data acquisition
and the user can still do a c.comedi_open("dev/comedi0") within python
and use all the other features of the DAQ device.

http://www.linux-usb-daq.co.uk/software2/comedi2py/
Git and the tar ball are most up to date

/Bernd

Ian Abbott wrote:
> Hi Victor,
>
> On 2012-05-11 13:28, "V�ctor E." wrote:
>> Hi guys, I'm new to comedi and to this list, my name is V�ctor, I'm
www: http://www.linux-usb-daq.co.uk/
http://www.berndporr.me.uk/
http://www.imdb.com/name/nm3293421/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
University of Glasgow
School of Engineering
72 Oakfield Avenue (Rankine Building for deliveries)
Glasgow, G12 8LT
Reply all
Reply to author
Forward
0 new messages