Robin2:
The value reported by the function millis() keeps incrementing for 49days - that's probably enough for your projec without any need to reset anything.Whenever one of your outputs goes high save the value of millis() - suppose the number 324752. Then the next time the output goes low save the new value of millis() - suppose it is 331252. You can calculate how long the output was high by subtracting the two values 331252 - 324752 = 6500 meaning the output was high for 6.5 seconds.
Study the code in this link - it will have a lot of the parts you require
Planning and Implementing a ProgramAlso study the use of arrays as a place to save your time values.
You will need to make a rough estimate. How many times will the motor power need to change while the machine moves that distance. If you just need a couple of hundred values (or less) they can probably be stored within the Arduino. If you need thousands of values you will probably need to store them on an SD card....R
I am looking into it, slowly I should be able to gather all that data to answer your questions.
I will study the link you gave, for sure that will take me a while
Thankyou so much sir.