Senthil Kumar SNR | 1 Aug 2002 13:35
Picon
Favicon

Re: doubt regarding DT2821 (ao_waveform error)

Hi
Even after using the patch it shows the same type of
error such that it seems does'nt support comedi
command. 
The displayed output is :

start :   	int     0
scan_begin:	timer	1000000
convert:	now	0
scan_end:	count	2
stop:		none	0
comedi_command_test: Invalid argument

Should we have to make changes in the comedi_cmd
structure or else any other way....?

Pls help.

senthil

--- David Schleef <ds <at> schleef.org> wrote:
> On Wed, Jul 31, 2002 at 04:30:09AM -0700, Senthil
> Kumar SNR wrote:
> > I am using DT2821 board and configured
> comedi-0.7.64
> > and comedilib-0.7.18. All configured fine and when
> we
> > try to execute the ./info it shows the 3 available
> > subdivices. But when we try to execute the
> ao_waveform
(Continue reading)

Ray Kelm | 1 Aug 2002 16:42

AO waveform bug

I am trying to get simultaneous analog input and output working with
a National Instruments PCI-MIO-16E-1 with comedi-0.7.65. 

When I tried to perform analog output of a fixed length waveform,
part of the waveform was truncated. It seems that the truncation is
dependent upon the sample rate, and the number of samples.

scan_begin_arg=20000, sending 1122 samples, drops 622
scan_begin_arg=20000, sending 1025 samples, drops 626
scan_begin_arg=15000, sending 401 samples, drops none
scan_begin_arg=15000, sending 511 samples, drops none
scan_begin_arg=15000, sending 1067 samples, drops 517

These results are with comedi-0.7.65. I had similar results with the cvs
snapshot from 2002-July-29.

If you want to see my code, it is available at:

http://www.newimage.com/~rhk/aotest.c

-Ray
Ray Kelm | 1 Aug 2002 19:50

AO waveform bug (more)

I managed to get the analog output to work. Apparently, the
handle_b_interrupt function was resetting the analog output registers when
there was still an interrupt pending after trying to fill the output fifo.
The attached patch will disable fifo interrupts if there is not enough data
to fill the fifo. this patch is applied to the cvs snapshot from
2002-July-29.

--- SNIP ------------------------------
diff -u2 comedi/comedi/drivers/ni_mio_common.c comedi-rhk/comedi/drivers/ni_mio_common.c
--- comedi/comedi/drivers/ni_mio_common.c	2002-07-25 19:45:33.000000000 -0400
+++ comedi-rhk/comedi/drivers/ni_mio_common.c	2002-08-01 12:44:19.000000000 -0400
 <at>  <at>  -584,5 +584,11  <at>  <at> 

 	if(b_status&AO_FIFO_Request_St)
-		ni_ao_fifo_half_empty(dev,s);
+	{
+		if (!ni_ao_fifo_half_empty(dev,s))
+		{
+			ni_set_bits(dev, Interrupt_B_Enable_Register,
+				AO_FIFO_Interrupt_Enable|AO_Error_Interrupt_Enable, 0);
+		}
+	}

 	b_status=win_in(AO_Status_1_Register);
--- SNIP ------------------------------

So I have moved on to getting simultaneous input and output working, and
have a problem with the input portion. Apparently, input is also dropping
samples. The analog input code worked in comedi-0.7.65, but with the current
cvs version it drop samples.
(Continue reading)

bml | 2 Aug 2002 05:16
Picon
Favicon

DMA and keeping track of reads/writes

I'm using the ni_pcidio driver to collect data with an externally driver
timer and DMA enabled. I'm using current stable releases of both
kcomedilib, comedi and the ni driver.

My question centers around keeping track of how much data is being
DMA'd.  In non-DMA setups, one can use the buf_user_ptr (or another
correct, up-to-date variable....) to track the reading and writing of
data.  I am unsure how to keep track of this with DMA enabled, since
these read/write pointer variables are no longer used. I'd like to know
when new data is arrving and when I can overwrite old data (think
circular buffer with my own rules).

Also, is there an easy way to change the buffer size on the hardware
through kcomedilib?

Regards,
Brent
bml22 | 2 Aug 2002 00:02
Picon
Favicon

restate

Here's a mild addition to my last message.

I have DMA working in user space with the ni_pcidio driver. I want to move
this code to a realtime (RTLinux) version. Right now I'm noticing that 
the result from mite_bytes_transferred() is always 0 under RTLinux, which 
it obviously shouldn't be -- it should be nicely increasing during 
acquisition, which occurs in my user space code. 

I'm using comedi commands for acquisition and now suspect that the 
problem may lie in kcomedilib's implementation of comedi_command() vs.
comedilib's implementation.

Does anyone have DMA working with this driver in a realtime setting?

---brent
Rafael Velez Cuartas | 2 Aug 2002 01:12
Picon

Java and Comedi

Anyone know how to use comedi with java
John Sims | 2 Aug 2002 01:29

Re: Java and Comedi

On Thu, 2002-08-01 at 17:12, Rafael Velez Cuartas wrote:
> Anyone know how to use comedi with java
I'm using the two together.  I've found the best way is to either exchange data
through the file system that comedi creates or if you're running under
RTAI, use the FIFO structure and/or JNI, depending on what you want to
do.  What do you have in mind?

JOhn
Rafael Velez Cuartas | 2 Aug 2002 14:04
Picon

Re: Java and Comedi


----- Original Message -----
From: "John Sims" <john.sims <at> rockhouse.biz>
To: "Rafael Velez Cuartas" <velezcuartas <at> epm.net.co>
Cc: <comedi <at> comedi.org>
Sent: Thursday, August 01, 2002 6:29 PM
Subject: Re: Java and Comedi

> On Thu, 2002-08-01 at 17:12, Rafael Velez Cuartas wrote:
> > Anyone know how to use comedi with java
> I'm using the two together.  I've found the best way is to either exchange
data
> through the file system that comedi creates or if you're running under
> RTAI, use the FIFO structure and/or JNI, depending on what you want to
> do.  What do you have in mind?
>
> JOhn
>

I'm working in a server/client pair to monitor and administrate a PCIMIO,
the principal objetive is to trasmit the signals over a LAN and using MPI or
PVM make some light Parallel Process with the data.
Michal Dobes | 2 Aug 2002 14:39
Picon
Favicon

Re: Java and Comedi

Rafael Velez Cuartas wrote:
> I'm working in a server/client pair to monitor and administrate a PCIMIO,
> the principal objetive is to trasmit the signals over a LAN and using MPI or
> PVM make some light Parallel Process with the data.

Why not write the client side in regular C with kcomedilib and gsoap 
libraries and server side in java? With SOAP as transport layer?
And if java side is uphelded with 600 GB Oracle data store then this
can look very sexy. :-))

	Majkl
Rafael Velez Cuartas | 2 Aug 2002 22:56
Picon

Re: Java and Comedi


----- Original Message -----
From: "Michal Dobes" <dobes <at> tesnet.cz>
To: "comedi" <comedi <at> comedi.org>
Sent: Friday, August 02, 2002 7:39 AM
Subject: Re: Java and Comedi

> Why not write the client side in regular C with kcomedilib and gsoap
> libraries and server side in java? With SOAP as transport layer?
> And if java side is uphelded with 600 GB Oracle data store then this
> can look very sexy. :-))
>
> Majkl
>

Michael thanks for the info about SOAP, i'm writing the server (the one that
control the device) in C and the clients (to monitor and control the device)
in JAVA, i'm not sure about the parallel becouse i want to finish this first
and i want to make the better choice.

Gmane