The gauges are actually a google chart creation. I created a web service to return the relevant information. Each time we get an update we send the new data to the chart, the animations are then taken care of by Google Charts itself. I also update the HTML itself using the document references.
In my initialise function, I get the references to the tags that I want to edit:
CPU_text = document.getElementById('CPU_txt');
So why not use an interval? This will ensure that if the script is busy, or you set the interval too short that a whole series of function calls isn't queued in the script engine, a new one can only be queued once the intial one has been serviced. Think of it like an event structure in LabVIEW being bombarded by events.
Attached you will find the code for this. It has been written and hosted on a compactRIO but should run on any RT target. If you point the project at your cRIO and deploy the web service you will find the page at http://crioaddress:8080/RTDemo/Static/index.html.
I hope to add one more demo in the near future showing:
How to have a proper homepage.
How to take your trend data and decimate it for display in the web service. This minimises the data sent over the network, but if done wrong could miss features.
amCharts: They appear to be an alternative to Google Charts that I believe can work without a web connection.
James Mc ======== CLA and cRIO Fanatic My writings on LabVIEW Development are at devs.wiresmithtech.com
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.