I would be grateful for some schooling... I am trying to pull in the last 20 values of a pi tag and then grab the values of another pi tag at the time stamps of the first pi tag. I then want to calculate the difference in the 2 pi tag values at each time and finally calculate an average of these differences. To do this I thought I would use the .recordedvaluesbycount and .timedcalculate. I am having trouble using the help files for the sdk examples in my ACE environment. I have attached a screen shot of my code. Hopefully I am close?