Hi all,
I’m hoping someone may be able to help me with a problem I’m having with the K8055 board. Specifically, I’m creating a Windows service that continually monitors the board’s input for change. The project is written in C#, so I’ve created a simple pinvoke wrapper around the exposed functionality of the K8055D.dll. When I start the service, I open a connection to the device, then if successful I start a poll timer to read all digital and analog inputs, just as in the provided example C++ application. What I’m seeing however, is that all seems to be well for a short period of time (ie, the timer fires and values can be read successfully), but then after a while nothing. No reaction to any changes in input on the board. If I attach a debugger, I can see that my worker thread handling the timer is stuck inside a call to ReadAllDigital(). Obviously, I can’t get any more information than this as I can’t debug into the dll.
Can anyone shed any light on this issue? I’m wondering what could cause that particular call to block indefinitely? I’m thinking it’s probably something to do with the implementation of the dll … is it thread safe? Does it have any dependencies on Windows Messaging, etc?
Any assistance would be much appreciated,
Regards,
Craig Shaw