10-21-2009 09:35 PM
I am using the PCIe-6320 with two rotary encoders and I'm trying to graph the position difference between the two. I quickly wrote c# (C Sharp) code, mostly borrowed from the Angular Position Counter example, entirely in the main form.
When I was satisfied that the hardware worked, I wanted to move all the DAQ-related code into a separate class. I moved it and now I'm seeing a major problem.
One counter is set to complete its asynchronous operation after 3000 ticks of its sample clock. The other counter goes on indefinitely (numberOfSamples is set to -1). The other counter should never complete, yet somehow is completes IMMEDIATELY. Furthermore, if I ignore the error which results, the first counter never completes its operation and it times out.
This ALL worked before I moved my code over to the separate class and the code is nearly identical. What could be wrong? I can clean up and post the code if necessary.
11-05-2009 08:37 AM
Hi,
I'm not sure what could have changed in your code, however, I'm primarily curious about what the error is that you're ignoring. Feel free to post some cleaned up code, as well as the error you get. Thanks!