History Lists and Sampling

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Kurtz
Posts: 11
Joined: Wed Jan 09, 2019 2:37 pm

Just can't quite figure this one out. I'm populating a history list every refresh (40ms), will be either 0s or 1s. Now I want to pop the sum of the entries for the last 1 second into another Stored Value which I use to trigger an alert.

It's the Sampling dropdown that's confusing me. What is its relevance?

I'm just after the sum of the entries in the last second. The dialog page does give me the option to sum a range from a History List and set the period of the sum i.e the last second. Seems good enough at this point.

However if I select every second for sampling what does this give me? There should be 25 entries for every second and I only seem to be getting the value of one of them.

It seems the sum won't work unless I add a sampling period, if I use 1 second the resulting sum is always 1 if I use 0.5 sec then its 2. The returns I am expecting can go from 0 to 25 (all 0s or all 1s) but all I get is 0s, 1s or 2s

Is there any way I can just get the sum without the sampling?
eatyourgreens
Posts: 302
Joined: Sun Feb 18, 2018 12:53 am

hi,
I think! you need to do something like this,

store the values you want 0 or 1 into say history list 1, rearm every refresh.

store a value in history 2 with value in history list 1, plus the value of history list 1, rearm every refresh.

if you then clear the values in history list 2 armed every second, I !think! you should end up with the total 1 or 0s in history list 2 for the previous 1 second.

hope I am right!, I am sure Dallas or James, or all worthier than me could confirm!

good luck!
Post Reply

Return to “Bet Angel - Automation”