I am trying to build a program to interface between an optical encoder that will sense the position of the pedals on an exercise bike and LabView. I have a program that does this, but there is a delay in the angle read by LabView and the actual positioning of the pedal. I am using a sampling continuously, at a rate of 1000 Hz. The optical encoder updates about once every millisecond, so the problem does not seem like it could come from there. Also, I built an executable file to run the application on another computer, and it seemed to be sampling at a lower rate, even though the computer used was faster than the one I used to make the program.