- From: Martin Merz <martin.merz_at_t-online.de>
- Date: Fri, 30 May 2003 11:31:37 +0200
Hello Frank,
> I put some fixes into cvs to try and get TRIG_WAKE_EOS to work with PCIDMA
> enabled. Would you test that?
Ok, now i don't get the "broken pipe" - message when i scan und convert with
timers. When i use the push-button sometimes i get the "broken pipe" message.
But for this i need a better digital source and no push-button.
> It's a hardware limitation, you can't ask for less than 2 scans. The
> driver catches it during the command test now.
The minimum value for cmd->convert_arg is 5000 ns. Is this correct ? This
means i need for the scans minimum 5000 ns + the time for 2 analog converts ?
Hhmmm ... or is the cmd->convert_arg time, the time between the converts from
the 2 channels ?!
> > 1. Is this the right way to read from the analog channels and the dio's
>
> Well, there may be a significant delay between the analog scan completing
> and you reading the dio lines. Ideally, you would use dio hardware that
> supported external triggering. The driver support in comedi for dio
> commands is not very extensive yet however.
Is it a limitation from the comedi - driver or the hardware ? ... or both ? Do
you know any card / comedi - combination where this work ?
More questions because at the moment, i think, it's not possible to solve my
requirement.
In my last mail i described that i get an startsignal (signal for
synchronisation), this means that i have to read with each tiggersignal
(it's an 2nd signal) the analog channels (it's no problem if i get here 2
analog values from each channel) and the dio's. At the end i get an stop -
signal and i have to stop all conversions.
For this i configured the cmd structure like this:
n_chan=2;
n_scan=2;
cmd->flags |= TRIG_WAKE_EOS;
cmd->start_src = TRIG_EXT;
cmd->start_arg = PFI0|CR_EDGE ;
cmd->scan_begin_src = TRIG_EXT;
cmd->scan_begin_arg = PFI7|CR_EDGE;
cmd->convert_src = TRIG_TIMER;
cmd->convert_arg = 5000; /* in ns */
cmd->scan_end_src = TRIG_COUNT;
cmd->scan_end_arg = n_chan; /* number of channels */
cmd->stop_src = TRIG_COUNT;
cmd->stop_arg = n_scan;
cmd->chanlist = chanlist;
cmd->chanlist_len = n_chan;
Now, it's difficult to describe my attempts, but i hope you understand it.
With this configuration i call comedi_command(), first i set PFI0 later PFI7,
with the read() function i get two analog values for each channel, then i get
an 0 from read(). If i call read() again, immediatly, the read() returns 0.
My next step, n_scan=4, but then, i trigger with PFI0 / PFI7 only once and i
get all results back .... after that always o from read(). I thought i can
trigger every scan ?
Then, i always call comedi_command() before i call read(), but this means i
have always trigger PFI0 and PFI7 .... but i only want to trigger once with
PFI0 (startsignal) and for ich analog value with PFI7.
My next attempt, i change the configuration after the first scan. Therefor, i
change the configuration after the first scan. But for this i have to run
comedi_test() before comedi_command(). If i don't do this, i get the
following message: "comedi_command: Resource temporarily unavailable"
if( first == 1 ) {
cmd->start_src = TRIG_EXT;
cmd->start_arg = PFI0|CR_EDGE ;
first = 0 ;
} else {
cmd->start_src = TRIG_NOW;
cmd->start_arg = 0 ;
}
Is this the only way to solve my problem ? Is it possible to stop after i get
an stop - signal from PFIx ?
Do you have any idea ?
Thanks
Martin
Received on 2003-05-30Z08:31:37