- From: Adam Weiss <adam_at_signal11.com>
- Date: Tue, 1 Aug 2006 08:09:15 -0700 (PDT)
I got this working the way we thought it should, so I thought I'd follow
up to the list so it ends up in the archives:
I needed the lastest comedi and comedilib from CVS. I also wasn't or-ing
in CR_EDGE.
Here's my command structure:
cmd.flags = 0;
cmd.start_src = TRIG_EXT;
cmd.start_arg = NI_EXT_PFI_0 | CR_EDGE;
cmd.scan_begin_src = TRIG_TIMER;
cmd.scan_begin_arg = floor(1.0E9/freq);
cmd.convert_src = TRIG_TIMER;
cmd.convert_arg = 0;
cmd.scan_end_src = TRIG_COUNT;
cmd.scan_end_arg = nchans;
if (nscans == 0) {
cmd.stop_src = TRIG_NONE;
cmd.stop_arg = 0;
}
else {
cmd.stop_src = TRIG_COUNT;
cmd.stop_arg = nscans;
}
--adam
On Tue, 1 Aug 2006, Adam Weiss wrote:
>
> Hey Folks,
>
> Has anyone gotten start_src=TRIG_EXT to work with NI-PCI-6035e cards?
> We've been playing with it for a few days and haven't been getting the
> results we were expecting.
>
> Either our expectations are wrong, the code is wrong or something is wrong
> with our environment.
>
> We expect that when start_src=TRIG_EXT is used with comedi_command(), any
> subsequent calls to read() or select() would indicate that no data is
> available until a signal is received on the input specified by
> start_src_arg.
>
> In reality, when we attempt this, both read() will start returning samples
> and select() will indicate data is available even if nothing is plugged
> into the input. We've even tried unplugging everything from the box and
> we still see this behavior.
>
> Is this behavior by design or is something going wrong here?
>
> If something is going wrong here, has anyone been able to get
> start_src=TRIG_EXT to work with NI-PCI-6035e cards? (or any NI card for
> that matter?)
>
> I can dig up the docs and would be more than happy to hack on the driver
> if this functionality is buggy or not implemented. (At first glance, it
> appears there is some code in ni_mio_common that deals with this) But
> before I get too carried away, I want to make sure it really is supposed
> to work the way we think it does and whether or not there might be
> something wrong in our envrionment. (ie: does it work for other people?)
>
> If anyone has any information to offer regarding this issue, I'd much
> appreciate it.
>
> Thanks!
>
> --adam
>
>
> _______________________________________________
> comedi mailing list
> comedi_at_comedi.org
> https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
>
Received on 2006-08-01Z14:09:15