I'm new to using PI AF SDK in Python, and a bit confused about the following error message when I tried to use 'RecordedValuesByCount' method in the PiPoint instance.
TypeError: No method matches given arguments for RecordedValuesByCount
What I'm trying to do:
- Given a start time, retrieve the previous 1 event (compressed value) for a tag
What I tried to do:
- Used PiPoint.RecordedValuesByCount -> didn't work, got the above error message
- Then tried to use the PiPoint.RecordedValues method instead where I constructed AFTimeRange in a way such that start time of the range > end time of the range, and used maxCount = 1 to retrieve the latest information. However this method gives me the next value, what I need is the previous value.
Any ideas why I'm getting the above error message? Are there any other ways of solving this problem?