Perspective 8.1 Ad Hoc Trend

This being my first time posting anything technical in a forum, bare with me.

We have a use case around deploying Ad Hoc trending capability. I upgraded to the latest ignition version 8.1 to leverage the perspective power trend. Here are my initial findings and area(s) for improvement.

The overall functionality is what we are looking for, that being said it has some initial release issues that I reached out to technical support on. We found that the Initial database custom parameter has a scripting error which does not allow the DB save/load functionality to visualize in the runtime. Some quick modifications allowed accessibility of this function.

Please note: these are quick test to find the barrier and temporary work arounds . These are by no means a permanent solutions.

image

Once that was visually operational, I found another issue in the SaveToDb script. Changing this resolved the fist error.

###############################################################################
##Added to try and resolve issue Stetson Ridley
connectionInfo = system.db.getConnectionInfo()
dbType = connectionInfo.getValueAt(0, “DBType”)

##Orginal Code in this block.
#dbType = dbInfo['DBType']

##############################################################################

Followed by another error when executing the system.db.runPrepUpdate.

A short work around was to manually add in the Insert statement to check for parsing issues.

###############################################################################
##Added to try and resolve issue Stetson Ridley

	system.db.runPrepUpdate("Insert INTO ad_hoc_trends_config (config, config_name, private, username) VALUES (?,?,?,?)", [configJson, configId, private, username], dbName)

	##Orginal Code in this block.	
	#system.db.runPrepUpdate(insertChartConfigQuery, [configJson, configId, private, username], dbName)
	logger.debug('Saved new chart configuration to database "%s"' %dbName)

###############################################################################

The above code worked as a troubleshooting method and allowed the SavetoDB to execute.

There are more issues that will need to be resolved, I am sure these will be resolved in due time. As I progress I may add in the issues found and how I temporarily resolved them. Also a few suggestions. 1) The ability to resize the window and/or ability to completely detach it from the power trend. Allowing for the tag browser to potentially be place in the side windows. 2) Incorporate optimisation in the tag navigation for large systems (10,000 tags) pre rendering, DB driven, or whatever makes sense. 3) Include a feature to limit amount of pens on the power trend. 4) Include feature to delete saved trend. 5) Interface overall speed optimisation, this may be a challenge when dealing with so many pens/data points.