# Historical data for motor speed

**URL:** <https://forum.inductiveautomation.com/t/historical-data-for-motor-speed/60940>\
**Category:** Ignition\
**Created:** [June 20, 2022, 2:58am UTC](https://forum.inductiveautomation.com/t/historical-data-for-motor-speed/60940 "2022-06-20T02:58:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [June 20, 2022, 2:58am UTC](https://forum.inductiveautomation.com/t/historical-data-for-motor-speed/60940/1 "2022-06-20T02:58:52Z")

</div>

I have a trend where I am displaying the speed of a motor. This motor runs at a fixed speed (occasionally the operators will adjust the set point, but this is a maybe-once-a-day type occurrence). The motor starts and stops as necessary according to process conditions irrelevant to the questions at hand.

Here we can see a trend of the motor speed (green/blue), as well as the motor running feedback from the drive (orange). I have configured the motor speed trend pen with “step after” interpolation. I would expect the motor speed trend to essentially mimic the motor running signal with only a very slight trapezoidal shape at the start and the end for the ramp up/down time (a few seconds). However, it doesn’t do this:

 ![Screen Shot 2022-06-20 at 11.28.28 am](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/4/54818ad72a43f663cb5bd284cbe6bd6331fd0903.png)  
Instead the trend line appears to ramp up/down over the entire length of the motor run time, which in most cases is several hours.

When I change the motor speed pen to be a scatter plot, we can see that there appear to actually be data points at these locations:

 ![Screen Shot 2022-06-20 at 11.29.40 am](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/c/8c03a6a21375bf1bae0d9ff0e598ca752254aa7e.png)

…which (a) should not be the case because the motor is not ramping up over the course of two hours, it’s running at a fixed speed, and (b) the historical data setup should not be storing data that way.  
 ![Screen Shot 2022-06-20 at 11.41.41 am](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/59a42d390aad5f8245396aedddf476044215bcb3.png)  
Out of curiosity, I set up a display with a table, and bound the table data to a tag history query for that motor. What I’m seeing is that as the motor ramps up to speed, data points are stored several times per second, at increments of less than 0.01Hz, while the history configuration suggests that it should not log a value until the difference is 1.0Hz.

 ![Screen Shot 2022-06-20 at 11.48.23 am](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac17d30578ee562f3b17e57959e6ca064b856495.png)  
Following that, I just have page after page of the exact same speed logged, again, several times per second, despite the fact that it should not be logged while at the same speed for at least an hour, according to the tag history settings. Given that the minimum time between samples is 1s, I can’t see how it could ever be sampling multiple times on the same second in any case.  
 ![Screen Shot 2022-06-20 at 11.48.35 am](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/e/aee8478b13609cece584b124f60b506e6446b91d.png)

What’s going on here?

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [June 20, 2022, 3:04am UTC](https://forum.inductiveautomation.com/t/historical-data-for-motor-speed/60940/3 "2022-06-20T03:04:00Z")

</div>

In case it’s important, here’s the tag binding configuration for that table

 ![Screen Shot 2022-06-20 at 1.03.40 pm](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b68cc4d2e1046ea01f037177d4fb49b3b079b112.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 20, 2022, 3:17am UTC](https://forum.inductiveautomation.com/t/historical-data-for-motor-speed/60940/4 "2022-06-20T03:17:04Z")

</div>

> [@ASF](#):
>
> What I’m seeing is that as the motor ramps up to speed, data points are stored several times per second, at increments of less than 0.01Hz

Incorrect. What you're seeing is the result of _interpolation_. Use the AsStored query mode instead in your Table binding and you should see your raw data. Unfortunately you can't display raw data in the Power Chart yet so you're kinda stuck with what you've got for now. I created a post and feature request a few months ago relating to a significant number of poor useability issues ([[FEATURE] Increase usability of the Perspective Power Chart component](https://forum.inductiveautomation.com/t/feature-increase-usability-of-the-perspective-power-chart-component/51474))

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [June 20, 2022, 3:40am UTC](https://forum.inductiveautomation.com/t/historical-data-for-motor-speed/60940/5 "2022-06-20T03:40:33Z")

</div>

Riiiiight, yes, when I change that binding to as stored I get only three results: 0, 6.5, and 0 again. That makes sense.

I figured that interpolation would just be determining how to draw lines between the points that DO exist, which should result in this working correctly, as opposed to how to draw the line between points after interpolation has been applied. I’ll check out your feature request and add a my vote to the tally.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 20, 2022, 4:26am UTC](https://forum.inductiveautomation.com/t/historical-data-for-motor-speed/60940/6 "2022-06-20T04:26:43Z")

</div>

PS. the best we have at the moment to show useful charts is to _decrease_ the max time between samples. I set this to 5mins for my trended tags which guarantees points every 5mins. It increases your data usage and also the niceties of having a succinct dataset goes away, but at least your trends display ok.

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [June 20, 2022, 4:50am UTC](https://forum.inductiveautomation.com/t/historical-data-for-motor-speed/60940/7 "2022-06-20T04:50:48Z")

</div>

Yeah I had that idea and I’m tossing up whether or not I should present it to the client as an interim solution. I’d rather not if I can avoid it, but if needs must…
