- From: <d.patterson_at_mail.utexas.edu>
- Date: Fri, 21 Feb 2003 16:56:08 -0600
I am testing a NI PCI-6023E card using the .../comedilib/demo/cmd program.
I cannot get more than 4608 bytes from the card. I modified cmd.c to print
the ret (from ret=read(comedi_fileno(dev),buf,BUFSZ);) and total from
each call to read, and to not print the returned data. The
following is the output for a
run at 1000 Hz and a run at 100 Hz. Also shown is a diff of the original cmd.c
(cmdOrig.c) and the modified one. I get 4096 bytes of data from the
first read call,
512 bytes from the second read call, and 0 bytes from the third read
call, for a total
of 4608 bytes. I should get a total of 8000 bytes. Any ideas on
what is going on?
Thanks,
Don Patterson
[don_at_wuhan demo]$ pwd
/home/don/comedilib/demo
[don_at_wuhan demo]$ ./cmd
command before testing:
start: now 0
scan_begin: timer 1000000
convert: timer 1000000
scan_end: count 4
stop: count 1000
first test returned 4 (argument conflict)
start: now 0
scan_begin: timer 4000000
convert: timer 1000000
scan_end: count 4
stop: count 1000
second test returned 0 (success)
start time: 1045866824.403899
ret=4096, total=4096
ret=512, total=4608
end time: 1045866828.407710
time: 4.003811
[don_at_wuhan demo]$
[don_at_wuhan demo]$
[don_at_wuhan demo]$ ./cmd -F 100.
command before testing:
start: now 0
scan_begin: timer 10000000
convert: timer 3276750
scan_end: count 4
stop: count 1000
first test returned 4 (argument conflict)
start: now 0
scan_begin: timer 13107000
convert: timer 3276750
scan_end: count 4
stop: count 1000
second test returned 0 (success)
start time: 1045866851.255207
ret=4096, total=4096
ret=512, total=4608
end time: 1045866864.373198
time: 13.117991
[don_at_wuhan demo]$
[don_at_wuhan demo]$
[don_at_wuhan demo]$ diff cmd.c cmdOrig.c
152,153c152
< printf("ret=%d, total=%d\n",ret,total);
< /* if(verbose)fprintf(stderr,"read %d %d\n",ret,total);
---
> if(verbose)fprintf(stderr,"read %d %d\n",ret,total);
161c160
< } */
---
> }
--
Donald M. Patterson Voice: (512)-471-5648
Fusion Research Center Fax: (512)-471-8865
Univ of Texas, Austin, TX 78712
d.patterson_at_mail.utexas.edu
Received on 2003-02-21Z22:56:08