Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
Subscribe method 5.23
I strongly recommend, however, that you use the ReadMultipleItems method, instead of calling the ReadItem in a foreach loop.
BTW, the call to UnsubscribeAllItems is unnecessary with this code (unless there is more to it than posted here).
Best regards
Please Log in or Create an account to join the conversation.
I would be, however, surprised, if subscriptions worked but ReadItem does not. Thes error from ReadItem looks like DCOM-config related.
Please Log in or Create an account to join the conversation.
it's ok for a long period of working? Using around 30 tags (using a foreach tag => read item)? Because for each timestamp i need to store the value in a DB but also to compute it in a math expression.
Please Log in or Create an account to join the conversation.
Im coding some methods with this approach in C#:
However I would like to have an button to Unsubscribe the items. How can I do it? Its possible in the button1 to subscribe, read and then unsubscribe? Because for my approach I need only to read an item and don't need to subscribe it. My initial idea is to have an timer and then read some items with specific timespan and then process it.
I'm trying this approach because the ReadItem returns me after a few days an unhanded exceptions e.g.:
OpcLabs.EasyOpc.OpcException: An OPC operation failure with error code -2147024891 (0x80070005) occurred, originating from 'OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient'. The inner exception contains details about the problem. ---> System.UnauthorizedAccessException: Access is denied.
OpcLabs.EasyOpc.OpcException: An OPC operation failure with error code -1073430509 (0xC004C013) occurred, originating from 'OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient'. The inner exception contains details about the problem. ---> System.Runtime.InteropServices.COMException: Read not completed. This error indicates that it could not be verified that the requested read operation was completed during the timeout period. It is possible that the read operation will actually succeed or fail, but later. Increase the timeout period if you want to obtain positive or negative indication of the operation outcome. Other reason for this error may be that under heavy loads, topic request or response queue is overflowing. Check the event log for queue overflow errors (if event logging is supported by the product and enabled).
--- End of inner exception stack trace ---
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.CheckSuccess(OperationResult operationResult)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.ReadItemValue(ServerDescriptor serverDescriptor, DAItemDescriptor itemDescriptor, DAReadParameters readParameters)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.ReadItemValue(ServerDescriptor serverDescriptor, DAItemDescriptor itemDescriptor)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.ReadItemValue(String machineName, String serverClass, String itemId, VarType dataType)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.ReadItemValue(String machineName, String serverClass, String itemId)
Please Log in or Create an account to join the conversation.