comedi_command( ) for mccdaq pci 6034........... ERROR

Hi All,
 
I have this little strange problem with mcc pci6034 card using the comedi_command( ) under comedilib-0.7.21 and comedi-0.7.69.
 
Attached is part of my .c code
 
frequency = 1000.0;
num_chan = 2;
num_scan = 100;
 
/*comedi_cmd_struct*/
 cmd.subdev = subd;
 cmd.flags =  0;
 
 cmd.start_src = TRIG_NOW; //start the whole sampling process
 cmd.start_arg = 0;
 
 cmd.scan_begin_src = TRIG_TIMER;  //time between the start of each scan
 cmd.scan_begin_arg = 1e9/freq;  /* in ns*/
 
 cmd.convert_src = TRIG_TIMER;  
 cmd.convert_arg = 5000;  /* in ns */ (verified using comedi_command_test)
 
 cmd.scan_end_src = TRIG_COUNT;
 cmd.scan_end_arg = num_chan; /* number of channels */
 
 cmd.stop_src =  TRIG_COUNT;
 cmd.stop_arg =  num_scan;
 
 cmd.chanlist =  chanlist;
 cmd.chanlist_len = num_chan;
 
 // start the command
 ret=comedi_command((comedi_t*)device,&cmd);
 
My problem is this:
 
I have used a sampling frequency of 1 kHz in the above program. 
I have input a sine wave of 1kHz using a function generator.  I have also used an oscilloscope to check this sine wave is actually 1kHz.  
But when i run the above program, I can see about 6 complete sine waves within my scan of 100 samples!!!  I have checked that each wave is about 14 samples wide == period of each wave is 14ms.  I was expecting a somewhat straight line.
 
Is my interpretation of the arguments for comedi_command( ) wrong?  Or is it a bug in the driver?  Comedi_command( ) hanged my system when i was using comedi-0.7.65, comedi-0.7.67 and comedi-0.7.68.
 
Thanks
 
wee

Received on 2004-10-21Z16:22:18