06-13-2013 11:18 AM - edited 06-13-2013 11:33 AM
Here is the result of time analysis between a simple program to run a stepper motor based on 3 different methods. I see there is no great time optimization between the first two and also there first method seems to be slighlty faster.
I believe ( with the help of this forum and other literature sources) that PC should be much a much better method when processing speed and compiler optimization are concerned. Whereas, the 3rd one based on State machine is nearly 50% faster than the first two.
Why is this ?
What could be the possible reason for this kind of results. Is it because the way I programmed is not good and efficient ?? (attached are all the programs)
1. Case structure with local variables.
2. PRODUCER CONSUMER PROGRAM
3. State machine with Event structure
PS: ( The time analysis of previous post I made where wrong as the motor ran twice, the above times are the right ones.)
06-13-2013 12:18 PM
This attachement contains all program (names mentioned clearly)