PCI-DAS4020/12 external triggering?

Hi
I have just begun to use the comedi lib as the Linux driver for a  
Measurement computing PCI-DAS4020/12 AD card. So far I have gotten  
the card initialized and samples are taken, but the problem right now  
is how the external trigger should be set up. I am using the BNC  
connector on the backplane on this board and it seems to trigger but  
the data I get is time skewed compared with what I see with a  
oscilloscope. I have been looking into the driver code and have seen  
that you should be able to change if the trigger should occur on a  
positive or negative flank, and also the trigger level should be  
possible to change between 0 or 2.5 V but I have not found how this  
should be done through the API and I am not sure what the default  
values are.

This is the current setup that I have

cmd->start_src = TRIG_EXT; /* looks like the trigger happens on neg.  
flank */
   cmd->start_arg =  1; /* Need to be non zero if TRIG_EXT else 0 */
   cmd->scan_begin_src = TRIG_TIMER;
   cmd->scan_begin_arg = 10000; /* 100 -> 10 MHz 1e9/10e6=100 */
   cmd->convert_src = TRIG_TIMER;
   cmd->convert_arg = 1;
   cmd->scan_end_src = TRIG_COUNT;
   cmd->scan_end_arg = n_chan;
   cmd->stop_src = TRIG_COUNT;
   cmd->stop_arg = 200;  /* Number of samples taken */

Hope someone have some clue what I am doing wrong here, the software  
I am using is in principle the cmd.c which I have re-written slightly.

Best regards Assar W.

Received on 2007-06-20Z12:11:14