Using time for subsetting


Recommended Posts

Hi

Would appreciate your help again, in order for us to get averages of kWh produced I have been reading the same modbus register at once a second with muliple channels that have varying histroy times and then averaging the channels. I thought that if I read the same channel with a history of 24 hrs and then AVG time subsets of the channel it would create less overhead. Although the likes of

Avg((Feeder2_kW[SysTime()-1800, Systime()])+(Feeder1_kW[SysTime()-1800, Systime()]))

seems to work OK for a rolling AVG when I try

Avg((Feeder2_kW[8h 30m, 9h])+(Feeder1_kW[8h 30m, 9h]))

I still get an ever changing number whereas I expected a fixed result(unless we passed into a new 24 hr period). Can you tell me if 8h 30m is fixed or is it 8h 30m ago ?. I just wish to average different time slots within a twenty four hour period but some of these must relate to specific times ie: average power produced between 08.30 to 09.00. I am probably makeing this far too complicated as usual and would appreciate your advice.

Regards

Steve Lawrence

Stewart Island NZ

Link to comment
Share on other sites

8h30 and 9h are all absolute time. 8:30 and 9:00 this morning. At midnight, they change to the next day and thus become in the future for 8.5 and 9 hours respectively.

The problem is most likely that you put a space between 8h and 30m. The time value can't have spaces in it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.