Answers.Body: <p>The simplest way to "remember" a starting position is to make the starting position <code>0</code>. You can do this using Rest in the Motor Rotation block (1). After your motors have moved (simulated by (2)), you can use a loop (3) to run the motors back to zero.</p>
  
  <p>The basic idea though is that if the motor position is negative, then we need to run the motor in the positive direction and vice versa. This way we run back towards a position of <code>0</code>. Once we reach a motor position of <code>0</code>, we exit from the loop and stop the motor (5).</p>
  
  <p>This is meant to be an example to point you in the right direction and can be improved. For example, you could use a proportional controller at (4) to slow the motor as it nears the <code>0</code> position. The sample code as it is below will oscillate several times before it gets exactly to <code>0</code>, which is not very nice.</p>
  
  <p>Additionally, you will need to add code that waits for a button press before starting the loop and you will need additional loops for each motor.</p>
  
  <p><a href="https://i.sstatic.net/V12CU.png" rel="noreferrer"><img src="https://i.sstatic.net/V12CU.png" alt="sample code"></a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-18T03:52:31.143Z
Answers.LastActivityDate: 2016-07-18T03:52:31.143Z
Answers.UserDisplayName: David Lechner
Body: <p>I am currently working on a project that uses large motors. I want the project to return to a "starting position" (0,0,0) at the touch of a button so that it can be used multiple (identical) times. How can I do this with the regular Mindstorms EV3 software (I am using the education version)?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-17T20:47:49.240Z
Comments.Text: I tried to find the answer to this a year ago. Unless you build some sort of synchronisation point using another sensor, you can't.
Comments.UserDisplayName: Simon Featherstone
Tags: <ev3><motor><software>
Title: How can an EV3 motor "remember" it's starting position?
UserDisplayName: Christopher H
ThreadText: # How can an EV3 motor "remember" it's starting position?
  
  (Asked by: username_0 on 2016-07-17)
  
  I am currently working on a project that uses large motors. I want the project to return to a "starting position" (0,0,0) at the touch of a button so that it can be used multiple (identical) times. How can I do this with the regular Mindstorms EV3 software (I am using the education version)?
  
  **Tags:** ev3, motor, software
  > **Comments:**
  > **username_1**: I tried to find the answer to this a year ago. Unless you build some sort of synchronisation point using another sensor, you can't.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-07-18. Score: 6
  
  The simplest way to "remember" a starting position is to make the starting position `0`. You can do this using Rest in the Motor Rotation block (1). After your motors have moved (simulated by (2)), you can use a loop (3) to run the motors back to zero.
  
  The basic idea though is that if the motor position is negative, then we need to run the motor in the positive direction and vice versa. This way we run back towards a position of `0`. Once we reach a motor position of `0`, we exit from the loop and stop the motor (5).
  
  This is meant to be an example to point you in the right direction and can be improved. For example, you could use a proportional controller at (4) to slow the motor as it nears the `0` position. The sample code as it is below will oscillate several times before it gets exactly to `0`, which is not very nice.
  
  Additionally, you will need to add code that waits for a button press before starting the loop and you will need additional loops for each motor.
  
  [![sample code](https://i.sstatic.net/V12CU.png)](https://i.sstatic.net/V12CU.png)
  
  
  ---
  
  