More of a nuisance, but if there's a simple solution, I'd like to know, or if I'm doing something wrong:
I have a template with a sparkline that resolves to an indirect partial path passed to the template custom property. I do have a default value typed into this custom property. Within the template, this property is an indirect within the sparkline to the historical tag path.
On client startup, and likely when this window with the templates is opened, i get a database entry error in the gateway logs, and the path part that uses the custom property is Null. So somehow the sparkline is querying the historian with an unformed path. Then, of course after that, no more errors, as presumably the property resolves to the binding and all is well.
Its not causing any issues other than irrelevant entries in the logger. But is there a better way to avoid this?
I think a lot of people have used fadeIn animations to hide the errors while loading.
You could check the Overlay Opt-Out too, but if the binding does legitimately error out, you won't see the overlay. Also, check out the Publish Initial Uncertain Value. Tag Bindings in Perspective | Ignition User Manual
Ah, my bad. Maybe you could use another custom property to hold some initial data, then use a coalesce() expression on the data property to default to your initial data while the tag history populates.
Revisiting this….Coalesce doesn’t work to remove the error log, as the path it is trying to coalesce is still unformed.
To reiterate, I am getting a log error that the sparkline tag path is invalid on initial load of the window. I’ve tried both passing a parameter, and creating an internal property in the template preloaded with a value, but the sparkline appears to try and resolve the indirect within its indirect binding before the passed parameter or the internal parameter. This never happens on popups, doing the same with an easy chart, but this is a sparkline on a template.
I know I can just create two identical seperate templates and not use an indirect, but point the sparkline directly at the path. But I'd like to know what I’m doing wrong.
This is the current iteration where I moved the “ID” to an internal template parameter bound to a memory Tag within the passed pathstr folder. Before, I was passing the ID as an additional template parameter and that didn’t change the behavior. The Error in the logger only occurs on first load of the window/Project. Afterwards, its fine until the Project is restarted. The tag path in the error shows “_press” instead of “front_press”.
I was trying to think of a way to “delay” initial sparkline polling. Is it possible to do as you suggest, turning off polling, then programmatically re-enable polling after X time? Or is that more hokey than just using a repeat timer on the template and doing a refresh?
An option would be to move the history binding to a custom prop, and disable the overlay for that binding. Then use a change script to move good results to the spark line's data property.
Ok, will try that. Reading the docs, polling off still refreshes one time on initial load, so I think I'd have the same issue with unformed tag path error.