08-22-2018 09:28 AM
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!!
Solved! Go to Solution.
08-22-2018 10:35 AM
@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.
08-22-2018 10:47 AM
i tried using the front panel, but its not read fast enough.. one turn of the motor after the reducer is 17600 pulses
08-23-2018 04:07 AM
What does "fast enough" mean in this context? How fast do you need to be able to read it?
08-23-2018 04:26 AM
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.
08-23-2018 04:27 AM
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?
08-23-2018 04:30 AM
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.
08-23-2018 04:55 AM
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
08-23-2018 05:07 AM
I am counting the pulses on the FPGA
in the RT I am attending to use PID for position control
08-23-2018 06:19 AM - edited 08-23-2018 06:19 AM
I cant view your code because I only have LV 2015 installed.
8kHz should be no problem whatsoever.