LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Read Analog Inputs and Outputs using SBRIO and FPGA

Solved!
Go to solution

Calculating the sinewave on the FPGA will save you resources on the RT but it's more complicated and less flexible. Try it both ways to see the advantages and disadvantages. I don't know of any other examples.

0 Kudos
Message 11 of 36
(1,598 Views)

Take a look at this VI. We tried to mimick the one referenced in the library about a simple continuous acquisition. However It seems like it's stuck in the configure timing loop. Because it basically timeouts waiting for the IRQ which never comes. I look at the FPGA File for the DeltaSig Main but I cannot determine what the IRQ actually does. Nor can I seem to tell why the VI doesn't seem to run. Is there something we over looked.


@nanocyte wrote:

Calculating the sinewave on the FPGA will save you resources on the RT but it's more complicated and less flexible. Try it both ways to see the advantages and disadvantages. I don't know of any other examples.


 

0 Kudos
Message 12 of 36
(1,587 Views)

Your ADCs are SAR modules so you should use the SAR code. Is it possible you modified "ConfigTiming"? The link to it was broken on ContAcq.

 

The IRQ is used to pause the FPGA execution until the IRQ is acknowledged using the invoke node in "ConfigTiming" and in "start"

0 Kudos
Message 13 of 36
(1,582 Views)

@nanocyte wrote:

Your ADCs are SAR modules so you should use the SAR code. Is it possible you modified "ConfigTiming"? The link to it was broken on ContAcq.

 

The IRQ is used to pause the FPGA execution until the IRQ is acknowledged using the invoke node in "ConfigTiming" and in "start"


Okay I switched to the SAR target on the FPGA instead but I still get the same issue. When I was troubleshooting it seems to give that error while waiting in the ConfigTiming VI for the IRQ to respond but it never doesn and timesout. That's why it's given my the error from that VI. However, I would assume if its the IRQ then the error is coming from the FPGA file which I had to modifiy in order to work for the SBRIO I'm using. I can't seem to find any reason why that wouldn't work. I uploaded the updated version

0 Kudos
Message 14 of 36
(1,579 Views)

I was able to use your code pretty much as is so that's not the problem. What is the error code you are getting?. That will probably tell us where the error is. I have a feeling it's related to your default sample rate which is beyond the spec of the RIO.

0 Kudos
Message 15 of 36
(1,575 Views)

Were you able to run it as is and see a waveform come in? No error popped up in the message box? I will run it one mroe time and check the exact code.


@nanocyte wrote:

I was able to use your code pretty much as is so that's not the problem. What is the error code you are getting?. That will probably tell us where the error is. I have a feeling it's related to your default sample rate which is beyond the spec of the RIO.


 

0 Kudos
Message 16 of 36
(1,566 Views)

Yes, no error. I used a sample rate of 1000 and a points per channel of 1000.

0 Kudos
Message 17 of 36
(1,564 Views)

@nanocyte wrote:

Yes, no error. I used a sample rate of 1000 and a points per channel of 1000.


Okay what waveform did you send it to test it by the way?

0 Kudos
Message 18 of 36
(1,560 Views)

Okay so we hooked up AIO and AGND to the function generator positive and negative leads. We don't read any value in. The error is different now. We get a value of 0 coming in but we know that not to be true because we tested the wave generated with an oscilloscope. The error coming in says "AcqRead(Wfm).vi" Error code: 537951


@generalgrant928 wrote:

@nanocyte wrote:

Yes, no error. I used a sample rate of 1000 and a points per channel of 1000.


Okay what waveform did you send it to test it by the way?


 

0 Kudos
Message 19 of 36
(1,555 Views)

Also we tested it with the sample rate of 1000 and 1000 samples per channel and still ran into the same issue. We still get a error in the box from the "ConfigTiming.vi" and the error code: 537955 I'm not really sure what that means but we should be within sampling reason for the RIO. The code is basically never even making it to the While loop to even acquire anything.

0 Kudos
Message 20 of 36
(1,550 Views)