I have a string OPC tag that is configured with ‘Sample Mode’ set to ‘On Change’.
Firstly, can anyone tell me why it is it that if I query the historian for this tag, I see consecutive duplicates?
Second, how do I query the historian for the last value logged (and its timestamp)?
dataset = system.tag.queryTagHistory(paths=tagPaths, startDate = startTime, returnSize=-1, aggregationMode="LastValue", noInterpolation = 0, ignoreBadQuality = 1)
is returning all logged data from
startTime until now rather than just the last one…