Hi,
I’m trying to query tags history within a module. I’m doing this by extending class com.inductiveautomation.ignition.client.script.ClientTagUtilities. I’m invoking protected method queryTagHistoryImpl method. Problem? Not getting data. Please let me know what I’m doing wrong:
ClientTagUtilities’s method definition is
Dataset com.inductiveautomation.ignition.client.script.ClientTagUtilities.queryTagHistoryImpl
(List paths,
Date startDate,
Date endDate,
int returnSize,
AggregationMode aggregationMode,
ReturnFormat format,
List aliases
)
-
In paths variable I send a list containing just one TagPath, which I send as a BasicTagPath. I instantiate BasicTagPath by sending the datasource name to constructor. Then I append to it the string with the tag name, like this
BasicTagPath path = new BasicTagPath(getDatasource());
path.append(path, tagPath); // I’ve tried also sending null in first parameter, same result.
// tagPath example = “line01/plc/good”
then I add this BasicTagPath instance to the list I send to the method as first parameter
- in ReturnSize I’ve tried -1 and 0 with no luck
- in aggregationMode I’ve tried Average, LastValue with no luck either
- in ReturnFormat I’ve tried Wide and Tall
- in aliases I send null
- In startDate and EndDate I send a range where I know there’s information stored in database for the tag.
Any help would be highly appreciated
Thanks in advance
Carlos