Hi
I am using a K8061 kit to control a process. It is operating fine.
For some operating reasons, the operator needs to unplug the USB cable for some seconds and plug it again, while the PC and kit softwares keep running.
When the USB is plugged again, the PC software refuses to communicate with the K8061 module. We need to quit and restart this software to have the communication.
My questions are :
When the USB cable is unplugged, the function “OpenDevice()” keeps answering CARD_ALREADY_OPEN (-1), which is false. I was expecting to get the answer (NO_CARD (-2))!
When the USB cable is plugged again, the function “OpenDevice()” refuses to make the connection and keeps answering CARD_ALREADY_OPEN (-1). How can I make the connection again without restarting the software?
Thanks for your support.
Indeed it seems that the software returns wrong message when the USB cable is unplugged.
I think the software is totally “confused”. It just remembers that the card was opened.
I’m sorry but there seems to be no solution to this problem.
Thanks for your prompt answer…
I have the same result when I use the demo software delivered with K8061. Do you have a solution for this software? It may help me to solve my problem.
Thanks in advance
The solution seems to be to use the new version of the software and new driver.
You can download the package from the Velleman download page. velleman.be/be/en/download/files/
The package contains driver and example programs.
I tested the Delphi version and it run without any problems after the USB cable was disconnected and reconnected. The text “USB Disconnected” was displayed when the USB cable is disconnected.
When USB cable is reconnected and “Connect” button pressed everything seems to work OK.
This is the name of the package:
k8061_vistapack_2007v1.zip
You can use this software package with Windows XP and Windows Vista.
Code for VB6,VB.NET,VB express edition 2005,Borland C++ builder,Visual C++,VC6,VC2005,Delphi.
hi
Thanks for your prompt answer.
I installed the new driver and tested the program 1\k8061_vistapack_2007v1\Delphi\K8061_Demo.exe. It operates as you mentionned.
However, when I compile the C++Builder version, I get the connection with the K8061 (reports Card1 connected and get the right address), but the software crashes whenever I try to sent instructiosn to the card : Set All Digital, Clear All Digital,… version info.
Furthermore, all the AD values are set to randome values (12444, 41324, …).
I ma using the sources as downloaded from vellemn site.
Indeed, the Borland C++Builder example didn’t work.
The solution was to recreate the import library K8061.LIB file using the Borland’s implib.exe utility.
Now the BCB demo project is working OK.
This is the link to download the project files: vel255.diinoweb.com/files/K8061_BCB_LIB_update1.zip
Hi
Referring to my previous post, the problem was solved.
I just received four new boards and have the same problem (when I unplug the USB cable and plug it again, the program K8061_Demo.exe (Version VK8061USB Rev 1.3 – IC6 Rev 1.5) cannot connect again when I hit the button “Connect”.
I need to restart the program again in order to be able to connect.
I think this new version does not include the correction you suggested.
Thanks in advance
In this new version there is an easy solution:
When the K8061 USB cable is unplugged and plugged again in, you can use the “CloseDevices” or “CloseDevice” function call to close the previous open link to the K8061 device.
When the “old” link is closed, you can use the “OpenDevice” function call to reconnect the device.
Please see the K8061_DLL_manual.pdf for more details about the functions “CloseDevices” and “CloseDevice”.
Thank you for your answer.
I tried this solution, noway! The proram remais blocked!
Can you send an example or update the demo program in order to be able to unplug and plug again?
Thanks alot.
Here is the link to download a new demo project: box.com/s/60f0511dfe0459422832
When the USB plug is disconnected and then reconnected, click the “CloseDevices” button.
Then click the “Connect” button and the board is connected again.