- From: Matthew A Swabey <mas01r_at_ecs.soton.ac.uk>
- Date: Tue, 12 Oct 2004 11:39:30 +0100 (BST)
I have a command that passes test but fails on run:
unsigned int samp_chanlist[] = {CR_PACK(0,0,7)};
samp_cmd.subdev = 0; /* AI subdevice */
samp_cmd.flags = 0; /* No flags as yet */
samp_cmd.start_src = TRIG_EXT; /* External Trigger */
samp_cmd.start_arg = PFI; /* PFI0 as trigger */
samp_cmd.scan_begin_src = TRIG_TIMER; /* Setup time between scans */
samp_cmd.scan_begin_arg = (int)((1 / (double)samp_freq) / 1E-9); /* Setup the timer freq for acquisitions */
samp_cmd.convert_src = TRIG_NOW;
samp_cmd.convert_arg = 0;
samp_cmd.scan_end_src = TRIG_COUNT; /* End the scan, only one channel */
samp_cmd.scan_end_src = 1; /*only one channel to be scanned */
samp_cmd.stop_src = TRIG_COUNT;
samp_cmd.stop_arg = samp_number;
samp_cmd.chanlist = samp_chanlist;
samp_cmd.chanlist_len = 1;
samp_cmd.data = sample_data_raw;
samp_cmd.data_len = samp_number;
This passes the test with a return value of 1, but fails execution with a
return of -1.
Its inteded to sample one channel repeatedly after an external trigger on
the PFI0 line. The card is an AT-MIO-16E-10.
Any help would be appreciated.
thanks,
Matthew
Received on 2004-10-12Z09:39:30