LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquistion using single-cycle timed loop in labview fpga (7833R target)

Solved!
Go to solution

Hi All,

I want to acquire analog input data from a funtion generator using single cycle timed loop  and DMA FIFO. I want to use the acquired data to act as process variable for my PID control. Can the code attached perform the purpose? I am sceptical about its functionality. Any advice or suggestions please.

 

Kind Regards,

Opuk

Download All
0 Kudos
Message 1 of 5
(2,207 Views)

Anything outside of the SCTL won't update while the SCTL runs.  You'll pass the same value each time.

Message 2 of 5
(2,191 Views)
Solution
Accepted by topic author Benvalet

The SCTL is not doing anything for you here.  Just remove it and write directly from your analog read to the DMA Write.

 

And on the Host side, you should move the Run method to before the loop.

 

You should also consider doing the PID inside of the FPGA.  PIDs work the best in a deterministic environment, and you can't get any more deterministic than on an FPGA.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 5
(2,170 Views)

Thanks alot natasftw for the response

0 Kudos
Message 4 of 5
(2,155 Views)

Thanks crossrulz for the prompt response. I removed the SCTL from the fpga and removed the Run method out of the loop as suggested and it works. Thanks

0 Kudos
Message 5 of 5
(2,149 Views)