Quote:
Originally Posted by Joe Ross
I just ran the following code:
Code:
double prevTime = 0;
public void teleopPeriodic() {
double time = Timer.getFPGATimestamp();
System.out.println(time-prevTime);
prevTime=time;
}
How does your test differ?
|
Joe,
Post #16 above is from the student we had redo the test. The differences between our original test and this one are switching from an OS timer to the FPGA timer like your code and the new test has the full PID drive code. The ~50ms DS measurement that originally had me questioning what was going on is now ~20ms as expected.
The timed loop measurement is also faster (11->16ms instead of >20ms) , but not the 10ms that we asked for. At this point we intend to set the timed PID loop to 15ms instead of 10ms to hopefully stay within the computation limit of the cRIO. Thanks for your help and example code for more accurate measurements.