recondaddy
Member
Not a question...just a post to help out anyone else who might someday waste hours on this same issue.
I'm building a data logging application in VB.NET that contains an OPC client to read data from a Cognex OPC Server. Whenever a part fails inspection, a fail bit in the vision program goes high. The OPC client application watches for a data change event with this bit and performs an asynchronous read of the failure data for logging.
Every time I would perform the AsyncRead, however, I would get the Microsoft version of the "Check Engine" light -- HRESULT 0x80040200 -- with no explanation of what was causing it. I discovered the problem.
Because I was doing an asynchronous read of the failure data and did not require data change events from this data group, I had the IsSubscribed property of the failure data group set to False.
Apparently, the Async calls depend on a ConnectionPoint callback. If the client does not provide the callback there is nowhere to send the results when they complete.
I hope this helps someone else, someday.
I'm building a data logging application in VB.NET that contains an OPC client to read data from a Cognex OPC Server. Whenever a part fails inspection, a fail bit in the vision program goes high. The OPC client application watches for a data change event with this bit and performs an asynchronous read of the failure data for logging.
Every time I would perform the AsyncRead, however, I would get the Microsoft version of the "Check Engine" light -- HRESULT 0x80040200 -- with no explanation of what was causing it. I discovered the problem.
Because I was doing an asynchronous read of the failure data and did not require data change events from this data group, I had the IsSubscribed property of the failure data group set to False.
Apparently, the Async calls depend on a ConnectionPoint callback. If the client does not provide the callback there is nowhere to send the results when they complete.
I hope this helps someone else, someday.