Hello!
I am using the K8061 USB interface board to do some reading using all the digital inputs. Actually, I have 64 bits, which is read eight by eight.
To control this, I let three analog outputs generate at binary pattern for 0, 1, 2 up to 7 (like: 000, 001, 010, 011 …etc.).
It is cycling ‘forever’, and reading at a speed of 3 readings of all 64 bits a second. This means, the output is changing 24 times a second.
I understand there is a small delay, from I set the output on the analog channel, to the channel is actually set on the board.
So I connected the three analog outputs to three analog inputs.
This way I can determine when the setting actually has taken place, and then read the digital inputs.
So far so good. It work fine - for approximately 100.000 cycles.
Then it somehow freezes. With my voltmeter I can see, that the analog channels is set, but the reading of the three analog input-channels says it is not (?).
When this happens, I can see the reading of the eight digital inputs are the same as the reading before, even though I can measure they have changed.
If I leave the things waiting, sometimes it starts up again. But I have to wait for - sometimes seconds, sometimes hours. This is not quite satisfying.
I have tried different things, but (software-)disconnecting and reconnecting doesn’t work. When disconnected the card won’t reconnect.
Stopping the entire program, and restart doesn’t work either.
I can pull the USB-cable and the power cable, and reconnect them. Sometimes it starts up again, and will run for another 100.000 cycles.
I have run out of ideas. Only thing left is this ‘PWM’-thing. I have not tried to do anything with this, as I haven’t the slightest idea about what it does.
Can anybody in here give me a hint?
(And what is this PWM? Does it need a setting I don’t know about?)
Sorry for the long speech, and many thanks in advance.