Some phenomenons in my experiment.
Hello, everybody.
After my test, I discover there are some phenomenons in my experiment.
This is my program1:

And this is my program2:

Above the description, I discovered the results of the program1 and program2 which were different.
Could anybody explain the phenomenon?
This is my test code
code.rar
Thanks a lot.
After my test, I discover there are some phenomenons in my experiment.
This is my program1:

And this is my program2:

Above the description, I discovered the results of the program1 and program2 which were different.
Could anybody explain the phenomenon?
This is my test code
code.rar
Thanks a lot.



Comments
The code in Control_servo2 is running in parallel with the code in Control_servo1 immediately after the coginit function, so Control_servo2 is calling SERVO.SetRamp at the same time the Servo1 function is calling SERVO.Start, and so on.
Your code is running like this:
Servo1 Servo2 Start Get position of Servo1 (notice that Servo1 hasn't even started running yet) Move to that position Move to 1500 Wait 5 seconds Wait 5 seconds Get position of Servo1 Move to that position Move to 2300 Wait 5 seconds Wait 5 seconds