Quote:
Originally Posted by GeeTwo
Forcing Pos and Vel to the "known" values without setting a known time is probably much of the issue. You're probably getting a way with it at the end of acceleration, but not at the beginning of deceleration. I would recommend making a table of times and positions and speeds, dropping in extra values at the start/end of each phase.
Also, the use of the variable Error is strange. You are ultimately only using it as a special case flag at the start of deceleration; where it is used to set Pos is more easily given as Pos:=Decelpoint;. This should just be a special print statement that is not part of a loop.
|
Thanks for that!
I'm still a bit unsure about all of this
Any chance you could kindly make your suggested amendments to the code to give me a better idea?
Thanks!