# Plot difference between two axis positions

**URL:** <https://forum.deltamotion.com/t/plot-difference-between-two-axis-positions/878>\
**Category:** RMCTools\
**Created:** [March 23, 2021, 8:36pm UTC](https://forum.deltamotion.com/t/plot-difference-between-two-axis-positions/878 "2021-03-23T20:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CharlieH](https://forum.deltamotion.com/letter_avatar_proxy/v4/letter/c/a87d85/32.png) [@CharlieH](https://forum.deltamotion.com/u/CharlieH)\
**Post date:** [March 23, 2021, 8:36pm UTC](https://forum.deltamotion.com/t/plot-difference-between-two-axis-positions/878/1 "2021-03-23T20:36:57Z")

</div>

I’m new here. I picked programming over RMCTools because I’m guessing some programming will be needed to create the value I want to plot.

As the topic says, I want to plot the difference between two axes positions. The axes are being controlled by one program. I want to monitor how far apart they are. Is there a way to put this in the “Formula” field of the Plot Template? Or, will I need to define a continually running program in a separate task to do the calculation? Or, other suggestions?

---

<div class="post-metadata">

**Author:** ![Paul\_Huumala](https://forum.deltamotion.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@Paul\_Huumala](https://forum.deltamotion.com/u/Paul_Huumala)\
**Post date:** [March 23, 2021, 9:05pm UTC](https://forum.deltamotion.com/t/plot-difference-between-two-axis-positions/878/2 "2021-03-23T21:05:53Z")

</div>

Hi Charlie,

Thanks for posting on our forum.

You will need to the calculation in a user program. Our Plot Template formulas do not support differences. Below is an example of the user program that can calculate the difference. The ABS will ensure the difference is always positive.

![image](https://forum.deltamotion.com/uploads/default/original/1X/540918c8c4c324a38a868dc9627cb39734066c3a.png)

I’d also recommend viewing this topic: [Make a user program always run](https://forum.deltamotion.com/t/make-a-user-program-always-run/436)
