<p>I hope someone finds this useful.
OK, this is working: I repeated the command, first with 1 step and then the full 1000 steps. Now, the motors move together in the same direction.</p>
<pre><code>digitalWrite(X_DIR_PIN, HIGH);
simpleAccel(1);
digitalWrite(X_DIR_PIN, HIGH);
simpleAccel(1000);
digitalWrite(X1_DIR_PIN, HIGH);
simpleAccel(1);
digitalWrite(X1_DIR_PIN, HIGH);
simpleAccel(1000);
</code></pre>
<p>GitHub: <a href="https://gist.github.com/d333gs/6f017ae1f41bfbc67eedb23ee1991c0c" rel="nofollow noreferrer">d333gs/Code update</a></p>

CC BY-SA 4.0
2024-11-28T11:28:10.033Z
Code link is a 404?
Trish
CC BY-SA 4.0
2024-11-28T10:34:58.270Z
2024-11-29T10:04:46.677Z
2024-11-29T10:04:46.677Z
John Francis
<p>The RAMPS X Clone as X1 works beautifully
But I am having a strange problem:
If you look at the code, there are two different parts. One is for a simple stepper move, and the other is for a simple acceleration. The simple move with X and clone X1 work. Simple Accel clone X1 does not. While X fulfills its command to move to the right side by a thousand steps, X1 does not: It moves 300 steps to the left (approximately) and then 700 steps to the right!</p>
<p>Can anyone find the bug?</p>
<p>The code link: <a href="https://gist.github.com/d333gs/dcf4f4124e640bd9d9b5ea50a662454d" rel="nofollow noreferrer">https://gist.github.com/d333gs/dcf4f4124e640bd9d9b5ea50a662454d</a></p>

<ramps-1.4><stepper>
What is wrong with my RAMPS X clone move/accel?
John Francis
# What is wrong with my RAMPS X clone move/accel?

(Asked by: username_0 on 2024-11-27)

The RAMPS X Clone as X1 works beautifully
But I am having a strange problem:
If you look at the code, there are two different parts. One is for a simple stepper move, and the other is for a simple acceleration. The simple move with X and clone X1 work. Simple Accel clone X1 does not. While X fulfills its command to move to the right side by a thousand steps, X1 does not: It moves 300 steps to the left (approximately) and then 700 steps to the right!

Can anyone find the bug?

The code link: <https://gist.github.com/d333gs/dcf4f4124e640bd9d9b5ea50a662454d>

**Tags:** ramps-1.4, stepper


---

## 1 answers

### Answer by username_0 on 2024-11-28. Score: 0

I hope someone finds this useful.
OK, this is working: I repeated the command, first with 1 step and then the full 1000 steps. Now, the motors move together in the same direction.

```
digitalWrite(X_DIR_PIN, HIGH);
simpleAccel(1);
digitalWrite(X_DIR_PIN, HIGH);
simpleAccel(1000);
digitalWrite(X1_DIR_PIN, HIGH);
simpleAccel(1);
digitalWrite(X1_DIR_PIN, HIGH);
simpleAccel(1000);

```

GitHub: [d333gs/Code update](https://gist.github.com/d333gs/6f017ae1f41bfbc67eedb23ee1991c0c)

> **Comments:**
> **username_1**: Code link is a 404?  

---

