Hello,
I want to configure my history tag settings with the TimeSeriesChart c
the goal is to set the parameter without needing to go to the Edit binding of TimeSeriesChart as shown in the attached image.
My path tag is like this : ‘[Formation]Moteur 1/Amps’
I try it but don’t work
def transform(self, value, quality, timestamp):
“”"
Transform the incoming value and return a result.
Arguments:
self: A reference to the component this binding is configured on.
value: The incoming value from the binding or the previous transform.
quality: The quality code of the incoming value.
timestamp: The timestamp of the incoming value as a java.util.Date
"""
endTime = system.date.now()
startTime = system.date.addMinutes(endTime, -30)
dataSet =system.dataset.toPyDataset(system.tag.queryTagHistory(paths=['[Formation]Moteur 1/Amps'], startDate=startTime, endDate=endTime, returnSize=1, aggregationMode="Maximum", returnFormat='Wide'))
return dataset
Your return is dataset, while your actual variable name is dataSet.
When pasting code, please enclose it in triple backquotes (`), you can even add the language after the first quotes, like so:
```python
code
```
And please posts the errors you get when something doesn't work. It's hard to troubleshoot if we don't know what the trouble is...