- From: Alexandre <alpebu_at_yahoo.com.br>
- Date: Tue, 3 May 2005 16:13:07 -0300 (ART)
I have the ni pci 6014 DAQ in /dev/comedi0, and a
simple code:
#include <stdio.h>
#include <comedilib.h>
int subdev = 0;
int chan = 0;
int range = 0;
int aref = 0;
int main(int argc,char *argv[])
{
comedi_t *cf;
int chan=0;
lsampl_t data;
int maxdata,rangetype;
double volts;
cf=comedi_open("/dev/comedi0");
while(1){
comedi_data_read(cf,subdev,chan,range,aref,&data);
printf("%d \n",data);
}
return 0;
}
This compile without problems, and print the data
colected in the screen. But, even when I don't change
de voltage in the analog input, the data grows, and
never stops growing, like (2000.. 3000...4000..). This
happens in ktimetrace too,the wave becames higher and
higher every time, until it desspears in the topo of
the window.
Yahoo! Acesso Grátis - Internet rápida e grátis.
Instale o discador agora! http://br.acesso.yahoo.com/
Received on 2005-05-03Z18:13:07