Hi Everyone,

Please forgive my ignorance I'm a complete noob with Pi Datalink.

I've been trying to get the PITimeFilterVal() function to work without much success.

The particular case I'm using it for is I have a fleet of 36 machines that I want to know how many hours each of them runs for each of the 28 day periods in the last 2 years. I've set up an excel spread sheet as shown in the attached picture, which is meant to summate the hours for each machine where the motor amps are greater than 40 (the running condition). The results seem to be OK for the first 3 rows but after that I get results that are impossible (greater than 672, which is the total hours in 28 days (bad data in red)). It appears that the function gets confused when the formula is dragged down. I also tried to manually input the formula with the same results. Interestingly after the third or fourth row of data the formula seems to ignore the zero for the outcode as it tries to drop additional data into adjacent cells.

If anyone can help me out I'd appreciate it.

Thanks

Cameron

Hello,

Since you are dividing your 2 year time frame into equal 28 days period, you can use =PITimeFilter() function. This is more or less the same function as the one above but calculation is done in parallel and in batch therefore should be much quicker.

Also you don't need to provide all your times. But all this would be automatically done if the UI is used. Please try out our UI first. This is Time Filtered in Calculation area but providing the "time interval" as 28d.

Below is my sample run. Please note that I put in Expression(s) as 'Sheet1!$G$4:$I$4 in right pane.

I have checked for my percent good just to know if the data provided is ok. But I can remove them as well for better presentation after.

More details on each options on right is in LiveLibrary link: https://livelibrary.osisoft.com/LiveLibrary/content/en/datalink-v6/GUID-6038E70B-87CB-40B5-93B1-DCE4D9D18A5F

I hope this helps.

Best,

Jin