I have some tags that are being logged with the “On Change” sampling mode with a minimum sample time of 1s. As we would need the data for each tag at every second, the tag history was pulled into a CSV file with the use of the queryTagHistory() function with a returnSize=86400 and noInterpolation=True.
However, we found that values that for timestamps, the tags are recorded to have a value of 0. We believe that at the timestamps where no change had occurred, the function stores the tag value as 0 rather than the last value. For example, if the tag has a value of 56 at 10:20am up till a change to 58 at 10:25am, all data extracted between these two timestamps would be treated as 0 (e.g. 10:20am : 56,10:21am : 0, 10:22am :0 … 10:25am : 58)
How do I store the last value (i.e. 56) for the timestamps in between the timestamps where the change occured? Thanks!