All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] CMD based acquisition with Analogy
@ 2011-01-08  0:10 Stefan Schaal
  2011-01-10 22:56 ` Alexis Berlemont
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Schaal @ 2011-01-08  0:10 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: Peter Pastor Sampedro, xenomai

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 2.6.29.5 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,

-Stefan

//====================================================================================

// 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);

//====================================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-10 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-08  0:10 [Xenomai-core] CMD based acquisition with Analogy Stefan Schaal
2011-01-10 22:56 ` Alexis Berlemont

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.