Professional OPC
Development Tools

logos

Disabling automatic subscriptions made with OPC Reads

More
22 Jul 2019 09:39 - 17 Oct 2019 06:48 #7552 by support
Note: In newer versions, EasyDAClient.SharedParameters.Topic has been renamed to EasyDAClient.SharedParameters.TopicParameters:
            EasyDAClient.SharedParameters.TopicParameters.SlowdownWeight = 0.0f;
            EasyDAClient.SharedParameters.TopicParameters.SpeedupWeight = 0.0f;
            var target = new EasyDAClient();
            target.InstanceParameters.UpdateRates.ReadAutomatic = Timeout.Infinite;
            target.InstanceParameters.UpdateRates.WriteAutomatic = Timeout.Infinite;
Last edit: 17 Oct 2019 06:48 by support.

Please Log in or Create an account to join the conversation.

More
04 Mar 2015 09:26 #2897 by support
For developers who use Live Mapping and want to make the settings described here:

The static parameters can and should be set in the same way.
Because in Live Mapping you typically do not create your own instance of EasyDAClient, but instead use the one provided by the mapper, you need to replace the lines the lines that set the instance mappers with lines that set the instance parameters on the client object contained in the mapper, and the resulting code will look like e.g. this:
EasyDAClient.SharedParameters.Topic.SlowdownWeight = 0.0f;
EasyDAClient.SharedParameters.Topic.SpeedupWeight = 0.0f;
var clientMapper = new DAClientMapper();
clientMapper.Client.InstanceParameters.UpdateRates.ReadAutomatic = Timeout.Infinite;
clientMapper.Client.InstanceParameters.UpdateRates.WriteAutomatic = Timeout.Infinite;

Please Log in or Create an account to join the conversation.

More
11 Feb 2015 18:22 - 11 Feb 2015 18:22 #2755 by admin
The above settings work with QuickOPC 5.32. For users of QuickOPC 5.23: To achieve the same effect, make all the settings described above, AND, in addition:
EasyDAClient.SharedParameters.Engine.AutoAdjustmentPeriod = System.Threading.Timeout.Infinite;
Last edit: 11 Feb 2015 18:22 by admin.

Please Log in or Create an account to join the conversation.

More
10 Mar 2014 10:45 #1761 by support
When you call Read, QuickOPC sets up an OPC subscription internally anyway. This is in attempt to have the values “ready” for you next time, without having to go the OPC server. QuickOPC observes the pattern of Reads, and from time to time, it adjusts the update rate of the OPC subscription. This is done by removing the items from one OPC group and adding them to a different group.

The rate adjusting operation may have some side-effects. It may be time consuming and be the reason of the occasional longer processing times. Writes would be affected indirectly – because (unless you specifically specify differently), only one “channel” is used to communicate with the OPC server, so while the items are being moved, other operations have to wait as well.

Also, the value of an OPC item that is being moved to a different group may be unavailable momentarily.

We do not provide a straightforward way to disable the auto-subscription and rate-adjusting mechanism described above. But you can try to set the parameters as below – the first two are static properties and should be set just once, at the beginning of the program; the other two are instance properties and should be set on each instance of EasyDAClient (if you have more than one):

            EasyDAClient.SharedParameters.Topic.SlowdownWeight = 0.0f;
            EasyDAClient.SharedParameters.Topic.SpeedupWeight = 0.0f;
            var target = new EasyDAClient();
            target.InstanceParameters.UpdateRates.ReadAutomatic = Timeout.Infinite;
            target.InstanceParameters.UpdateRates.WriteAutomatic = Timeout.Infinite;

Note that when doing it like this, it may very well happen that you Read times will become slower – because they will become a “true” OPC reads.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.176 seconds

      

 Recommend this on Google