Running Average

Forum Home Forums Understanding the Software Formulas Running Average

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17849
    WayneS
    Participant

    Greetings,

    I’m sure that there are better ways to do this, but here is how I have created a running average of the irradiance (sun strength) which resets every month.

    Channel 139 : irradiance level
    Channel 6101 :input formula Val(6102)/Val(6103)
    Channel 6102 :input formula EveryMin(() => MonthStarted() ? 0:Val(6102)+Val(139))
    Channel 6103 :input formula EveryMin(() => MonthStarted() ? 1:Val(6103)+1)

    This seems to be working.

    regards

    Wayne

    #17852
    Mikhail
    Moderator

    Hello,

    Thank you for sharing the solution. It is clear and simle. Perhaps, it can be called monthly average.
    Another solution for moving average is here, which is more complex and fits for a short period of time.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.