I need to read the stepper motor encoder. i have been simulating quadrature decoder has an example. but, when i am executing with fpga it able read the encoder value. but, position of the stepper motor and encoder position is not match.
Is their any separate calculation for exact reading o the stepper motor.
A few questions - please clarify any misunderstandings I have then we can perhaps proceed (numbered for ease of reference, not importance):
You have a real motor, a real encoder connected to that motor, and some sort of existing read-out or indicator that give you a "position" value for the motor
You have written some LabVIEW code (not attached) that works (correctly?) with a simulated encoder to describe a position
When you replace your simulated encoder pulses(?) with data being read via some hardware connected to your FPGA, the calculated position of the motor (as determined by the inputs to the FPGA and your code) does not match the value that your other indicator (perhaps a digital display on the controller or similar?) gives.
You wish to line up these two values?
As a quick starting question beyond those points....
5: Do the two values move at the same rate? That is, if "a" increases by 10, does "b" also increase by 10?
If the encoder is a rotary encoder, do they reset at the same frequency (not same position, I suppose, given the question). This is essentially the same question.
6: If not, do they have a linear relationship? That is, if "a" increases by 10, does "b" increase by 10*something, and then if "a" increases by 20, "b" increases by 20*<the same something>?