LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with AI on an NI 9239 module

Hello All,

I always wait as long as I can before asking for help so here is my problem.  I am using a cRIO 9012 controller and I have 2 9239's, a 9263 and a 9481.  I have wrote code to do a simple AI read and an AO write.  I am reading on one channel on the 9239 which is in slot 1.  I use a DMA FIFO (size 1023) to transfer the data to the host vi, where it simply displays the data on a chart.  I am using an external function generator to generate a sine wave to feed into the AI.  I am also generating a sine wave in a parallel loop on the FPGA that is being output through the AO.  I can see the sine wave just fine when the program is running, using a scope. 

The problem is I only recieve values of 0 from the AI when I have my signal going into the AI module.  There is also an error message from the AI node I placed on the FPGA block diagram.  It gives me error 65538.  I have tried making the size of my FIFO larger and smaller, and have tried various settings with the timeouts and depth and I can never get any data back.

I don't understand why I am not getting any data, but I can generate the sine wave just fine.  I was hoping someone could look at my code and maybe run it and see what they get.

 

I am using labview 8.2

9012 controller

2 9239 AI module's

9263

9481

there is a screen shot of the NI drivers on the cRIO and my code is attached

 

Please let me know if there is anything else I can send.  I used virtually the same set up on the same controller and a 9215 and it worked.

 

thanks

 

Kevin

Download All
0 Kudos
Message 1 of 5
(3,086 Views)

Hi Kevin,

 

You should find the answer to you question in this thread (missing to start the acquisition on the 9239):

 

http://forums.ni.com/ni/board/message?board.id=280&message.id=4406&query.id=303053

 

JMota

0 Kudos
Message 2 of 5
(3,080 Views)
Oh I see what I am missing now, you have to create that digital I/O to start and stop the 9239.  I will put that in my code and recompile and let you know how that works out.  Thanks!
0 Kudos
Message 3 of 5
(3,069 Views)

Hey,

 

Just wanted to let you know that was the problem.  The start and stop nodes fixed my code.

 

Thanks,

 

Kevin

0 Kudos
Message 4 of 5
(3,052 Views)

If that doesn't work, I would be extremely suprised.

 

Couple things to keep in mind when using the 9239 is that the IO Node is self-timed. You configure the data rate at which the module runs from the module's property page. If you are using multiple 9239's, you probably want to synchronize them to the same timebase. Again, this is something you do from the module's property page. I would recommend taking a look to the Synchronizing multiple NI 9233 modules example.

0 Kudos
Message 5 of 5
(3,051 Views)