recondaddy
Member
Hello,
I've been wrestling for two days with an issue and wanted to see if any of you gurus had any insight.
I have Cognex OPC Server 4.5 running. I'm writing an OPC client in VB.NET. It's not my first time writing an OPC client, but I'm no pro at it, either.
I have two OPC groups -- a trigger group and a data group. I am subscribed to the trigger group, and whenever the OPC server generates a data change event for that group, in the event handler, I call a subroutine that performs an asynchronous read of the data group. Simple enough, right?
Here's the crazy part. If I turn off the subscription to the trigger group and initiate an asynchronous read using the click of a button, everything goes off without a hitch. However, if I call the asynchronous read subroutine from the data change event handler of the trigger group, it never completes the read and locks up my GUI.
It's has nothing to do with my asynchronous read subroutine -- it works fine. It has to do with the manner in which it is being called. Call from a button click? Works fine. Call from a data change event? Locks up.
I'm stumped.
I've been wrestling for two days with an issue and wanted to see if any of you gurus had any insight.
I have Cognex OPC Server 4.5 running. I'm writing an OPC client in VB.NET. It's not my first time writing an OPC client, but I'm no pro at it, either.
I have two OPC groups -- a trigger group and a data group. I am subscribed to the trigger group, and whenever the OPC server generates a data change event for that group, in the event handler, I call a subroutine that performs an asynchronous read of the data group. Simple enough, right?
Here's the crazy part. If I turn off the subscription to the trigger group and initiate an asynchronous read using the click of a button, everything goes off without a hitch. However, if I call the asynchronous read subroutine from the data change event handler of the trigger group, it never completes the read and locks up my GUI.
It's has nothing to do with my asynchronous read subroutine -- it works fine. It has to do with the manner in which it is being called. Call from a button click? Works fine. Call from a data change event? Locks up.
I'm stumped.