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.
ItemChanged handler (after upgrade from 5.12)
I suppose that you know that Microsoft support for .NET 4.0 and, in fact, also 4.5 and 4.5.1, has ended just yesterday. That effectively leaves only 3.5, and then 4.5.2 and higher, as supported frameworks.
Best regards
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Note that the example code is intentionally oversimplified. e.Vtq may be null in case of errors; your code should check e.Exception for non-nullness first.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
dataCache[e.ItemDescriptor.ItemId] = e.Vtq.Value;
Now ItemDescriptor is gone, so where might I find ItemId for this value?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Note that it is 'static' only for the purpose of the sample code, in your app it probably won't be.
Best regards
Please Log in or Create an account to join the conversation.
Argument type 'method group' is not assignable to parameter type 'opcLabs.EasyOpc.DataAccess.OperationalModel.EasyDAItemChangedEventArgs'
How do you instantiate an event handler for ItemChanged?
Please Log in or Create an account to join the conversation.
I have not tested it, but can't you change
to
Provided that OPCItemChanged has proper argument types, it should be possible to simply write
Best regards
Please Log in or Create an account to join the conversation.
opc = new EasyDAClient();
var itemChangedEventHandler = new EventHandler<EasyDAItemChangedEventArgs>(this.OPCItemChanged);
opc.ItemChanged += itemChangedEventHandler;
The EasyDAItemChangedArgs is no longer in OpcLabs.EasyOpc.DataAccess. EasyOpc.DataAccess.Generic has EasyDAItemChangedEventArgs<T> and EasyOpc.DataAccess.OperationModel has EasyDAItemChangedEventArgs. So I selected second one because we don't have a <T>, but then the last line will not work, not assignable. It says opc.ItemChanged is of type EasyOpc.DataAccess.EasyDAItemChangedEventHandler.
Please Log in or Create an account to join the conversation.