LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA to RT latest value

Solved!
Go to solution

hello
i am trying to count pulses of an encoder motors and later to control them with pid,
The problem is that i am missing many pulses, i tried to implement the pid in the FPGA but its to much space
i tried to use DMA FIFO but it seems that it doesn't work, i need only the last value from the encoder for every loop
i am using chassis cRIO 9076, NI 9025, NI 9264
the motor turning at 30,000 rpm with a reducer of 1:275
i am adding the Vi 
thank for helping!!

Download All
0 Kudos
Message 1 of 17
(3,643 Views)

@EyalZ wrote:

i need only the last value from the encoder for every loop


Just use a Front Panel control on the FPGA to store your pulse count and/or encoder value.  Then your RT can just read that value when it needs to.


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 2 of 17
(3,626 Views)

i tried using the front panel, but its not read fast enough.. one turn of the motor after the reducer is 17600 pulses 
 

0 Kudos
Message 3 of 17
(3,619 Views)

What does "fast enough" mean in this context? How fast do you need to be able to read it?

0 Kudos
Message 4 of 17
(3,602 Views)

When i try to follow the position of the motors i don't succeed to read all the pulses on time, and i don't get the correct position.

0 Kudos
Message 5 of 17
(3,597 Views)

That's what you want to do, but how fast do you do it?  "i don't succeed to read all the pulses on time" .. weeks, years? What is "on time" here? How fast do you need the information?

0 Kudos
Message 6 of 17
(3,594 Views)

Wait.... are you counting the pulses on the RT system instead of on the FPGA directly? Why would you do that?

 

Can't you just output the position on an FP, and have the FPGA do the pulse counting?

 

Or at very least, just do pulse counting on the FPGA and output THAT to the FP.

0 Kudos
Message 7 of 17
(3,592 Views)

The technical data for the encoder is 8 KHz but because i am reading the difference between the rise time of channel A and B its need to much faster, i am not sure how much.. 
i switched to digit module and it seems reading much faster, but when i am reading the pulse in the RT it has some delay.

thanks for replaying  

0 Kudos
Message 8 of 17
(3,587 Views)

I am counting the pulses on the FPGA 
in the RT I am attending to use PID for position control

0 Kudos
Message 9 of 17
(3,584 Views)

I cant view your code because I only have LV 2015 installed.

 

8kHz should be no problem whatsoever.

0 Kudos
Message 10 of 17
(3,574 Views)