K8055 not answering when asking for digital_in

Hello All,

I am developing my own software for driving the card using the k8055d.dll API.

I am quite often having issues with the card not responding.
The steps are:

  • connection using the function OpenDevice(address)
    The connection looks successful and I get a correct answer

  • but, when I issue the function ReadDigitalChannel(channel) form time to time I don’t get any answer and my software hangs as it cannot proceed without reading those channels.

Did anyone have the same issue? Is it perhaps a problem of faulty board?

Thanks a lot for your feedback!
Nicola

Does the problem occur with other functions e.g. ReadAllDigital() ?
How often the problem occurs?
One possible cause of the problem may be defective USB cable.
Do you have possibility to test the board in other PC?

Thank you very much for the reply. Unfortunately I don’t have an easy access to the device as it is connected to a PC in a remote site. I access it through that PC. Next time I go there I will try to replace the USB cable with a better one hoping that the solution will be solved.
It occurs pretty often, but not always. What I saw is that sometimes I can recover the situation by turning on all USB devices connected to PC and then power off and on the PC: after some tries, I eventually can get answer from the card again. It is a very annoying situation and I would like to understand if there is a way to clearly define if it is a card issue or a usb issue.

Thanks a lot for your info in advance
Nicola

PS: forgot to mention. I didn’t try ReadAllDigital, I’ll give it a try

A quick update. After a while that everything was working, suddenly the card, after OpenDevice(address) does not answer anymore.

I also tried the ReadAllDigital, but it is not answering to this as well.

What can I do?

Nicola

When you plug the USB cable, does the LED LD8 flash three times and then stay off?

I am using it from remote, unfortunately I can’t tell you that. But I can tell you that it is not only my program that is affected. When the board does not answer anymore, even with the demo supplied with the API I can not get connected to the card.

OK.
When you have access to the board, please check the LED LD8 flashes.
If if flashes three times and stays off, it indicates that USB communication protocol started successfully.
If LD8 stays ON, it indicates USB communication problem.
If there are no flashes, it indicates microcontroller related problem on the board.

[quote=“VEL255”]OK.
When you have access to the board, please check the LED LD8 flashes.
If if flashes three times and stays off, it indicates that USB communication protocol started successfully.
If LD8 stays ON, it indicates USB communication problem.
If there are no flashes, it indicates microcontroller related problem on the board.[/quote]

Thank you for the advice. I might be able to visit the board next week. At that time I’ll have a look at the LEDs when it happens.

There are times when the connection at the beginning is fine, and after 2-3 hours it gets lost. Is there a way to debug this situation? I guess in this case the LEDs are not effective to debug,or am I wrong?

Thanks a lot!
Nicola

You are right, the LED can be used to check the operation only when the USB cable is plugged in.
The LED LD8 should flash three times and then stay off.

The problem may be caused by some other USB device or software…

Can you test the board in other PC?

I didn’t have the chance to go at the site yet, however I should be able to be there by the end of the month.
Because my time there will be limited, can you please list a sequence of tests to debug the situation so that I don’t waste time there and being able to find the root cause?

Second question: how is the k8055 seen from Windows 7? I wanted to try the devcon.exe application to try to restart the usb communication from remote, but I don’t understand how to recognise it among other HIDs.

Thanks
Nicola

{EDIT} I changed the topic as it is not simply related to an API command, is a more general issue on the board

First you can run the demo software K8055N_Demo.exe and check the board operation.
If not operating, unplug and then plug the USB cable.
When plugged in, check the LD8 operation.
If it flashes three times and stays off, this indicates that USB communication protocol has started successfully.
If LD8 stays ON, it indicates USB communication problem.
If there are no flashes, it indicates microcontroller related problem on the board.

Then you can run again the demo software K8055N_Demo.exe and check the board operation.

[quote]Second question: how is the k8055 seen from Windows 7?[/quote]It is seen as a Human Interface Device (HID) Class USB Device.

[quote=“VEL255”]First you can run the demo software K8055N_Demo.exe and check the board operation.
If not operating, unplug and then plug the USB cable.
When plugged in, check the LD8 operation.
If it flashes three times and stays off, this indicates that USB communication protocol has started successfully.
If LD8 stays ON, it indicates USB communication problem.
If there are no flashes, it indicates microcontroller related problem on the board.

Then you can run again the demo software K8055N_Demo.exe and check the board operation.

VID&PID?

Thanks
Nicola

VID: 10CF, Velleman Components
PID:
5500 (card address=0)
5501 (card address=1)
5502 (card address=2)
5503 (card address=3)

Values are in HEX format.

Hello,

at last I am at the site where my PC with the K8055 card is on.

I checked the card following your suggestion and this is the behaviour:

  • when I plug the usb cable inside the PC, the led flashes three times and then it turns off.
  • the card is working as expected.
  • while I operate with card the led turns on and randomly I can not connect to the card anymore until I unplug and plug back the cable

My tests:

  • I replaced the USB cable
  • Change PC
    Did not bring any improvement.

Do you have any suggestion?

Thanks for your prompt reply
Nicola

[quote]while I operate with card the led turns on[/quote]Does the LED D8 flash two times and then stays on?
If yes, this indicates the card has reset and fails to reconnect.
The flashes of LED LD8 also indicate that the +5V voltage from the USB connector to the K8055 card has interrupted.