SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Dear:
I am wondering what's the rule when we set the scan time of a EwsClient to poll data from a EwsServer.
As I know, in order to keep good performance, we can not set the scan time to be too short, maybe 30s or 60s would be suggested. However, when I discuss with clients for some project, they may prefer to get more "Live" data rather then "30s" or "60s" delayed data.
Then may I possibly know, for example , 1000 points to be polled, what's the shortest scan time I can set? could it be 5s - 10s? or is there some method to absolutely test out it?
-Austen Yin
Link copied. Please paste this link to share this article on your social media post.
HI Austen,
If you want to get data faster, this is possible, but I would suggest you don't use "GetValues" for this.. Instead I would suggest that you use the built in Subscription mechanism in EWS.
Subscriptions basically allows for you to specify a list of IDs that you want to watch (with a Subscribe request), and when you send a GetNotification request, only the values that have changed since the last time a GetNotification will be returned. (Also there is Renew and Unsubscribe requests.) From a performance perspective, SBO is much better and it is the recommended approach. In the case of SBO as the EWS Server.. You could definitely ask for data more often doing this, I have done it every 5 seconds with no problems.
In Mongoose.Processor.Ews there is a class called "SubscriptionReader'. It is there to help you facilitate this, all you need to do is pass in either a list of items, or a subscription Id, and it will handle the EWS requests it needs to send for you, including handling the Renews if needed. It will also notify if your subscription id changed (due to failures).
I have attached the GraphicsUpdateProcessor (From Cerberus). Which shows an example of the Subscription reader being used for new subscriptions (SubscribeAndReadNew()) and existing subscriptions (ReadExistingSubscription()). Again, note this is proof of concept code, so it is just to be used as an example.. I wouldn't copy and paste .
-Jeff
Link copied. Please paste this link to share this article on your social media post.
HI Austen,
If you want to get data faster, this is possible, but I would suggest you don't use "GetValues" for this.. Instead I would suggest that you use the built in Subscription mechanism in EWS.
Subscriptions basically allows for you to specify a list of IDs that you want to watch (with a Subscribe request), and when you send a GetNotification request, only the values that have changed since the last time a GetNotification will be returned. (Also there is Renew and Unsubscribe requests.) From a performance perspective, SBO is much better and it is the recommended approach. In the case of SBO as the EWS Server.. You could definitely ask for data more often doing this, I have done it every 5 seconds with no problems.
In Mongoose.Processor.Ews there is a class called "SubscriptionReader'. It is there to help you facilitate this, all you need to do is pass in either a list of items, or a subscription Id, and it will handle the EWS requests it needs to send for you, including handling the Renews if needed. It will also notify if your subscription id changed (due to failures).
I have attached the GraphicsUpdateProcessor (From Cerberus). Which shows an example of the Subscription reader being used for new subscriptions (SubscribeAndReadNew()) and existing subscriptions (ReadExistingSubscription()). Again, note this is proof of concept code, so it is just to be used as an example.. I wouldn't copy and paste .
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Just an aside to this information. There are limits to how many URis you can associate with a given subscription and that varys based on the type of device (Enterprise Server or Automation Server) that you can communicating with.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.