Hi,
I am using Measurement Studio 8.1.1. (C# programming) to make an application that needs to read the count of a quadrature encoder on a PCI-6259 card. I was first using Visual Studio 2005 and everything worked well. I have recently installed Visual Studio 2008 and reinstalled the drivers for Measurement Studio. Since that time, the encoder counter doesn't work anymore. (see attached code)
Instead of counting depending on the direction of rotation of the wheel, the reading always gives me the same value (the initial value, as if the counter was automatically reset after each reading). No Z signal is used and nothing is connected to the gate and to the output of the counter, only the signals A and B are connected to the SOURCE and to the UP/DOWN pins of the counter. Both counters on the card have the same behaviour...
I first though I had a problem with the circuit I have made to control the counter (a couple of D-latches and Schmit trigger that alow me to start/stop and reset the counter) but I have the same problem when I remove the circuit. Then I have switched for a PCI-6602 (still without the circuit) to see if I would get the same result and....yes...with a small difference : The edge counter works fine but the encoder counter, instead of going up and down only goes up and keeps the same value when the direction change instead of going down (which is better than keeping the same value whatever the direction of rotation is but this is not what I need!!!). Finally, I did the same test with Visual Studio 2005 and I get the same result whether I update the project references or not and even though the code hasn't changed at all since the last time I was working with Visual Studio 2005.
I now think this would have to do with the fact that I have reinstalled the drivers and with Measurement Studio 8.1.1 beeing not compatible with Visual Studio 2008. Could you please help me on that?
Thanks.