It’s been a long time. How have you been?
I’m working on a CNC mill that is to be controlled by an embedded micro controller (FezDomino), thus continuing a project that I started a year ago.
The link here has the progress with the fez thus far (http://www.youtube.com/watch?v=Uc-NcWWq_Cs)
I’m using the EasyStepperDriver from the tinyclr wiki and I noticed a major drawback: It cannot do more than 120 RPM on the motor as a result it’s dependency on the Thread.Sleep(1) method.
I’m writing a native CNC control program for the Fezes, based on how game programmers write their games; by using a master control loop. In this control loop timing is an issue. While game programmers can just let the program run at any frame rate that it can, I need to be able to have precise control of the stepping speeds.
I’ve figured that to do this I would have to write the program such that it calculates how long it takes to execute the control loop and then add in a variable amount of wasted time to ensure that the step commands are evenly timed. My method for doing this requires knowledge of how many nano seconds have gone by while the body of the control loop is executing.
The question is: How do you determine the number of nano seconds that have gone by during program execution?