Hi Alexis,

  here is an observation with CMD-based acquisition that puzzles me. Just to 
recall, we use an NI6259 board, using your latest analogy branch of xenomai on 
a kernel in Ubuntu 9.10. Our computer is a 32bit Dell Precision with 8 
core Xeon processors.

 A normal CMD based acquisition with internal trigger has the core elements as 
listed below. What puzzles me that it appears from my tests that the triggering 
of the acquisition with "a4l_snd_insn(&desc, &insn)" seems to take about 
200-300 us to complete. This is a very long time for us, as we need to start 
and stop a CMD based acquisition multiple times in our code.

Thus, my question is simply whether this long latency is normal from your 
experience? I used other a4l_snd_insn commands for INSN based data acquisition 
before (and I believe your "sync" data acquisition uses INSN, too), but always 
had 3-5us duration for these commands.

Best wishes,



// fill out data structures
  a4l_cmd_t cmd = {
    .idx_subd = ID_SUBDEV_DIGITAL,
    .flags = 0,
    .start_src = TRIG_INT,    // internal trigger
    .start_arg = 0,
    .scan_begin_src = TRIG_EXT,   
    .scan_begin_arg = NI_CDIO_SCAN_BEGIN_SRC_G0_OUT, // channel used to trigger 
the scans
    .convert_src = TRIG_NOW,
    .convert_arg = 0, /* in ns */
    .scan_end_src = TRIG_COUNT,
    .scan_end_arg = 32,
    .stop_src = TRIG_NONE,
    .stop_arg = 0,
    .nb_chan = 32,
    .chan_descs = chans,

  a4l_insn_t insn = {
    .type = A4L_INSN_INTTRIG,
    .idx_subd = ID_SUBDEV_DIGITAL,
    .data_size = 0,

// send command
 rc = a4l_snd_command(&desc, &cmd);
if (rc < 0) 
    printf("ni_test: a4l_snd_command failed (ret=%d)\n", rc);

// add some date to FIFO buffer 

// trigger acquisition
rc = a4l_snd_insn(&desc, &insn);
if (rc < 0)
    printf("ni_test: triggering failed (rc=%d)\n",rc);

Xenomai-core mailing list

Reply via email to