NI-ATMIO-16E and external triggering

I am having problems getting external triggering to work.

What I want to do is:
(1) start an acquisition using an external trigger
(2) collect 512 samples on a single channel, with CONVERT started from
an external source 

It appears that the following should be OK as a command:

	d->scan.subdev = 0; /* subdevice is ADC */
	d->scan.flags =0;
	
	d->scan.start_src =        TRIG_EXT; 
  	d->scan.start_arg =        0; /* PFI0 */
														
	d->scan.scan_begin_src =   TRIG_EXT;  
	d->scan.scan_begin_arg =   2; /* PFI2 */    
	
	d->scan.convert_src =      TRIG_EXT;    
	d->scan.convert_arg =      2; /* PFI2 */   
	
	d->scan.scan_end_src =     TRIG_COUNT;
	d->scan.scan_end_arg =     1;
	 
	d->scan.stop_src =        TRIG_COUNT; 
	d->scan.stop_arg =        512; 

	d->scan.chanlist =         d->chanlist;
	 d->scan.chanlist_len =     1;

and a call to comedi_command_test() says OK
but it isn't.

In particular
(1) When the command is executed, it returns rather more than 512*2 bytes
(sometimes hundreds of bytes more)

(2) If I disconnect the trigger on PFI0 (acquisition start), 
acquisition starts anyway, read() never
returns 0 and the readout loop sits there forever spitting out readings.

(3) Looking at the digitized signal, it appears that the acquisition
trigger is occurring at a random time.

I had this card doing the same job with Labview+Win95 no problems
so it's not a signal problem.

Vital statistics
	comedi 0.7.65
	kernel 2.4.19
	NI-ATMIO-16E

And a related question: in an old post on the mailing list,
it was said that the upper two bits of  _arg were used for
setting triggering parameters( edge/level/rising/falling).
This no longer seems to be the case. Is this correct ?
If so, how is this functionality accessible ?

Cheers
Michael Wouters.

----------------------------------
Dr Michael Wouters
Time and Frequency Section
National Measurement Laboratory
CSIRO Division of Telecommunications and Industrial Physics

PO Box 218, Lindfield NSW 2070
Sydney, Australia

(street address: Bradfield Rd, Lindfield NSW 2070)

Phone: (61 2) 9413 7268
Fax     (61 2) 9413 7631

----------------------------------

Received on 2002-11-07Z04:38:01