Dear Velleman support,
We have recently bought the VM140 card to use it to control a climate chamber. The card has everything on-board, we need for this. I have installed the card (new drivers on 64 bit windows 10 PC with touch screen), the demo app works fine.
Then I have written a user interface in WPF + c# so the user can control the settings of the temperature chamber from a PC with touch screen.
Everything works like it should, but now and then we have a problem with the connection to the card. I have written a procedure in my program, if the program loses the connection to the card it will try to reconnect every 5 seconds. I have tested this by unplugging the USB connector and reconnecting it again, and this works.
But now and then something happens so the PC loses the connection to the card and is unable to reconnect. The big problem is that the card thinks it is still connected (LED, LD 12 continues on)! If the card does not realize that the connection is gone, it will keep the last received output status instead of pulling all the outputs to default value (off). This is a big problem because if at that moment the heating or cooling is on. Then the chamber keeps heating or cooling. This has also the consequence that the PC is not able to reconnect.
I think this is because the card is not aware that the connection is lost and thus is not accepting new connections. When I disconnect the USB cable and reconnect it, the PC is able to reconnect and to continue the program.
What the reason is of the lost connection, I don’t know. Maybe electrical interference on the data wires of the USB wire?
I was not able to simulate this by disconnecting the USB wire, because the card sees a disconnection and reacts to it (LED LD12 starts to blink)
I found that I can get the card in this status by cutting the white Data - wire of the USB cable. Then the card is keeping its last received status and the program (also the demo program) is not able to reconnect after reconnecting the data - wire until I unplug / reconnect the USB cable.
I have tried to find a solution by trying to cut the power to the USB port with my c# program, but until now I did not find a way to do this.
So at this point I am stuck, and the complete project is unreliable until I find a solution to this problem.
Is it possible to provide me a solution to my problem?