Re: NI-6229 configuring PFI

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

Received on 2007-10-19Z06:39:34