[prev in list] [next in list] [prev in thread] [next in thread]
List: comedi
Subject: Re: NI-6229 configuring PFI
From: Carlos =?ISO-8859-1?Q?Jim=E9nez?= Leal <carlos_jimenez () encopim ! com>
Date: 2007-10-19 7:39:34
Message-ID: 1192779574.15426.4.camel () servidor ! encopim
[Download RAW message or body]
> > Hello,
> >
> > I'm trying to use the programable digtal input/outputs of 6229 (PFI
> > X/PX.X). I've achieved to read from demos like 'choose-routing', 'dio'
> > and 'inp', but trying to do it at the same way with the 'outp' doesn't
> > work.
> >
> > Read example:
> >
> > ./choose_routing (0-2) -c(0-15) -s7 -f/dev/comedi0
>
> choose_routing has no effect on input.
I don't know this. thank's.
>
> > ./dio -f/dev/comedi0 -s7 -c(0-15) 0
> > ./inp -f/dev/comedi0 -s7 -c(0-15)
> >
> > I read correctly the values 1/0 wether I aply 5V voltage or not.
> >
> > Write example:
> >
> > ./choose_routing (0-2) -c(0-15) -s7 -f/dev/comedi0
> > ./dio -f/dev/comedi0 -s7 -c(0-15) 1
> > while (true) do ./outp -f/dev/comedi0 -s7 -c(0-15) (0|1|5|10); done
> >
> > Measuring with a tester at the selected channel, it shows allways the
> > value of 0.
>
> > Making the routing, it doesn't mather which number I configure (0-2), in
> > every case, I view all the PFI's. I supose that configuring the
> > subdevice it is sufficient.
>
> I don't know where you got 0-2 from, but you should be using the values in
> enum ni_pfi_routing (and following inline function) in comedi.h. It
> sounds like you want 16.
>
I've tried 16 (NI_PFI_OUTPUT_PFI_DO) and it works correctly. Thank you a
lot for your help.
Carlos
_______________________________________________
comedi mailing list
comedi@comedi.org
https://mail.comedi.org/cgi-bin/mailman/listinfo/comedi
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic