Filter Specific Hourly Values from an Hourly SCADA Variable.
How do I get the values from the 2AM,6AM,10AM,2PM,6PM and 10PM hour slot from an hourly variable that has values every hour?
I first created a variable, 35071, that calculated the current hour of the day using the equation using the Hour and D math toolbox function:
Method 1: Hour(D)
Method 2: (D-trunc(D))
Then, of course there is the data variable, 35072, an hourly variable receiving data from SCADA
Next I created a variable, 35073, that uses an if statement to selectively pick data from specific hours. The equation for this is:
if(v35071=2 or v35071=6 or v35071=10 or v35071=14 or v35071=18 or v35071=22, v35072, blank)
That’s it! Now you can use DDMIN, DDCC, etc to summarize variable 35073.
Alternatively, if this needs to be done multiple times, you could create a variable like 35074 above. This variable returns a 1 for the specified hours and blank for the rest.
if(v35071=2 or v35071=6 or v35071=10 or v35071=14 or v35071=18 or v35071=22, 1, blank)
This way, multiple variables can use a much simpler equation to grab data from other data variables, like:
if(not isblank(c35074), v35072, blank)