- From: Vitor Angelo <vitor_at_ead.eee.ufmg.br>
- Date: Mon, 22 Mar 2004 10:22:53 -0300
Hi, # The TRIG_WAKE_EOS command flag, when used from kcomedilib to the ni # drivers, should be fixed now. End of scan callbacks should have worked # with the 0.7.68 code though, except you should have been passing the # COMEDI_CB_EOS flag to comedi_register_callback(). I'm using a pci-6033e and experiencing a problem that may be related. I've just updated from CVS to see if that would fix the problem, but it has not. I'm using kcomedilib, commands and a callback to perform continuous acquisition of several channels with RTAI. The relevant setup is this: cmd->flags = TRIG_RT; cmd->start_src = TRIG_NOW; cmd->start_arg = 0; cmd->scan_begin_src = TRIG_TIMER; cmd->scan_begin_arg = period; cmd->convert_src = TRIG_TIMER; cmd->convert_arg = 10000; cmd->scan_end_src = TRIG_COUNT; cmd->stop_src = TRIG_NONE; cmd->stop_arg = 0; comedi_register_callback(nidaq, 0, COMEDI_CB_EOS, comedi_callback, NULL); The number of bytes present in the buffer is always the _exact_ number for a complete sequence of samples, every time the callback is woken up, and the readings are correct. But, after some time, it happens that the callback does not wake up for about 1ms. When it does, the expected extra bytes are in the buffer, the code deals with them, and everything returns to "normal". Except for the fact that the callback wakes up several times in a row, just after the delay, according to the number of "missed wakeups". The frequency is 5KHz, but I've tried to reduce it and it made no difference. Everything works fine for 1 to 2 hours (the time varies but it's not frequency related, and periodic RTAI tasks don't experience the problem). I'm not using any other RTAI tasks when this program is running and the worst case latency of this system is about 20us. It really looks like the interrupts are disabled for some time, but it does not happen with periodic RTAI tasks using kcomedilib with functions like comedi_data_read(). Just with callbacks. I'd really appreciate any ideas. Please tell me if I need to send more information or perform other tests. Thanks in advance, Vitor.
Received on 2004-03-22Z13:22:53