Chart Polling Issue

Hi All,

I’m attempting to configure a time series chart to display tag history data which needs to poll the database at a rate of 5s. However, the chart data wont refresh unless I navigate from and back to the view.

Things I’ve tried:

  • XY chart and time series chart
  • 8.0.5 nightly and 8.0.4
  • Polling rates between 1-60s
  • Realtime and historical time range configurations

Any suggestions are greatly appreciated - thanks

I’m using the new Time Series Chart with no issues. I gave up on the xy chart because of some issues I had seen. I don’t know if this is the most efficient way to do it but it works.
I’m currently using 8.0.5 nightly (b2019092602)

Bind series data to an expression

To make it update every second make the expression now(1000) then add a transform script to get the historical data.

Here’s the script I use

    #Get 30minutes of historical data
	DataHtag = system.tag.queryTagHistory(paths=["[default]/path/to/HistoricalTag"], aggregationMode="SimpleAverage", returnFormat='Wide', columnNames=["t_stamp","RealData"],rangeMinutes=30)
	CompiledData = []
	headers=["time","Data Value"]
	#loop through all data and append time,
	#to a new array

	for row in range(DataHtag.rowCount):
            #I removed some code
            #I loop through data and add some additional info (upper and lower bounds) to array before plotting
	ds = system.dataset.toDataSet(headers,CompiledData)#convert array to dataset, with headers
	return ds
1 Like