DavidFogle
Member
I'm looking at trying to program Relay Ladder Logic to average out a value for X amount of time.
In this application I'm looking to have an output set at 30% over "Value X". I want value X to be set by taking 15-30 seconds of live data and averaging out the data.
I was wondering how I would attempt to set this up in Relay Ladder Logic. Currently I was considering Having 5 Timers set for 5 seconds each and while each timer was running write the measurement value to a tag. Then after the 25 seconds I would average out the 5 values I'm left with and set that as my Value X.
Is this the a feasible way to approach this application?
Thanks,
David
In this application I'm looking to have an output set at 30% over "Value X". I want value X to be set by taking 15-30 seconds of live data and averaging out the data.
I was wondering how I would attempt to set this up in Relay Ladder Logic. Currently I was considering Having 5 Timers set for 5 seconds each and while each timer was running write the measurement value to a tag. Then after the 25 seconds I would average out the 5 values I'm left with and set that as my Value X.
Is this the a feasible way to approach this application?
Thanks,
David