Hi everyone I need a advice, I\'m developing a desktop application (Winform) using C#, I have a Form and I have a separated class named OPC (other file)
This is s
There are two ways to get data from an OPC server: read directly or use the DataChange event. the choice is up to you and one or the other cannot be described as "best practice". If your question is just about implementation then I can tell you that you're missing " Handles ConnectedGroup.DataChange " on the end of your ConnectedOPCGroup_DataChange sub. Your OPCAutomation library will generate the event, you just have to handle it.
To address the second part of your question, it would be best practice to have your OPC client class separate from your main form.