LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LABVIEW FPGA - log High speed encoder readings

Solved!
Go to solution

Hi, 

I'm new to LabView FPGA. I have an encoder with 1000 ppr. I want to log each pulse from the encoder against a time stamp for 20 seconds at 4000 rpm. So that means I will have to log 66 666 pulses per second. I need to log all these pulses against a time stamp. 

I don't need to access data in real time. Since I need to acquire data only for 20 seconds, it is more than enough if I can access them after data acquisition. 

I am using a cRIO - 9024 with the high-speed digital card NI 9401. 

I need this to finish my MPhil thesis. And I'm in a bit of a hurry since my scholarship is only good for next 3 months. 

Thank you. I really appreciate if anyone can help me. I'm really screwed if I cannot get this right. 

0 Kudos
Message 1 of 2
(2,222 Views)
Solution
Accepted by topic author waruna1993

Hi waruna,

 

I want to log each pulse from the encoder against a time stamp

With each rising (or falling) edge of your pulse input you store the current timestamp of your FPGA into a FIFO. Read the FIFO on the RT host and store the timestamps into a file (or stream them to your PC host).

"Timestamps" on the FPGA can be just a counter of the DI loop iterations - your DI loop should iterate with a know timing/rate!

 

And I'm in a bit of a hurry since my scholarship is only good for next 3 months. 

You should learn about:

- using LabVIEW FPGA in general

- creating loops with known timing (iteration rate) on the FPGA

- creating a simple counter in the loop

- sending data from FPGA to RT using a FIFO

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(2,168 Views)