I am developing an OPC client in Windows C #. I developed the code and read the OPC Elements on a sample, as well as event-based (OnDataChange). When I work with the local machine, then my code works fine both with sampling and with OnDataChange, but when I try to read data from a remote OPC server, Sampling works fine, but I can not get event data based on the process. I can connect to the OPC server, but when I add a subscription to then I get an error.
HRESULT: 0x80040202.
group1.DataChanged += new DataChangeEventHandler(this.DataChangeHandler); group1.AdviseIOPCDataCallback();
The OPC server is connected, and then register the group, but I got an exception while reading the data.
source share