cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to speed up the update rate of my label chart?

Fusanmu
5-Regular Member

How to speed up the update rate of my label chart?

I added a current speed property and Valuestream to my Thing.Then I added the QueryPropertyHistory service to my Mash up.

I bind the data to my label chart.

But I found that my label chart will refresh and update the data every ten seconds. I set it to refresh every 0.3 seconds in the autorefresh widget.

How to speed up the update rate of my label chart?

1.jpg2.jpg3.jpg

3 REPLIES 3
TonyZhang
13-Aquamarine
(To:Fusanmu)

Hi @Fusanmu,

 

My suspect is refresh every 0.3 seconds is working, it's just the new data is not pushed to ThingWorx at such a frequent rate (data probably pushed from edge device every 10 seconds).

That why even it's refreshed there's no new data to be fetched or updated. 

 

To verify if the RefreshInterval setting is kicking in,

you can open up browser developer tool by pressing F12 function key,

navigate to Network tab to inspect whether the GetPropertyValues and QueryPropertyHistory services of PLCcoils Thing are executed at 0.3s interval.

VladimirRosu
19-Tanzanite
(To:Fusanmu)

Hi Fusanmu,

On top of my colleague's advice, I would like to share a bit of experience around the usage of Auto-Refresh.

Auto-refresh, as the name says, will trigger the bound services at a fixed refresh rate. This means that regardless of the user interaction, your ThingWorx server will experience a constant load when users access mashups that contain such a widget+its triggered services. Depending on the services triggered, this is potentially something that you might not want, especially when building applications that will be used by a larger number of users, not just 1 or 5.

If the services/s triggered by autorefresh are reading/writing from disk or doing any complicated logic, the result will probably be that when you will hit a limit of 10-20 concurrent users your system will be quite stressed and possibly will not handle that load.

Therefore my advices regarding the auto-refresh are the following:

-ONLY use autorefresh if your usecase really requires the use of Auto-Refresh. Example: if there is a process in the production line that requires data to be displayed automatically without user interaction. If not, remove it and implement a manual "Refresh data" button. You need to think along the following line here: what value do I have for my user if the data refreshes automatically? Some people are tempted to say: if I see something wrong, then I act on it, but in this case you should send an alert to the user via other mechanism (email, sms etc) and not rely on him to have his eyes glued to the screen.

-If you can, instead of AutoRefresh, use the GetProperties with the "Automatically send properties when able" checkbox and implement the required information as a Thing Property. Why this? Because properties are stored in memory, and do not require any read/writes from the disk, hence being extremely fast.

-do not trigger services which execute read/write operations from the disk. This includes reading from files,  reading from a database...and query a thing's historical properties (since that executes an SQL query). I can not provide all the list of services that read/write from the disk, but with a bit of experience, you should figure them out.

 

Keep in mind that all the things said above might not be true to all the situations, and try to think when it makes sense and when not.

And yes, if you carefully size your ThingWorx server, know the number of users that will use the application, Auto-Refresh will work

 

Good luck!

 

TonyZhang
13-Aquamarine
(To:Fusanmu)

Hi @Fusanmu,

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards,

Tony

Top Tags