2 cards K8055

Hello,

I have a problem with activation of digital output by connecting 2 card K8055.
I created an interface with 16 buttons. The first 8 to card 1 (address 0) and 8 for the following card 2 (address 1)

If I click on the buttons 1-3-5 (for example) to activate the 1-3-5 out the card 1, it works! but then if I click on a button to the card 2, the same output number that the card 1 are activated! But I set out the different cards:

My code in WinDev :

Code Button 1 to 8:
AppelDLL32 ( “K8055D.dll”, “OpenDevice”, 0)
AppelDLL32 ( “K8055D.dll”, “SetDigitalChannel”, 1) / / here the channel 1 card 1

Code button 9 to 16:
AppelDLL32 ( “K8055D.dll”, “OpenDevice”, 1)
AppelDLL32 ( “K8055D.dll”, “SetDigitalChannel”, 1) / / here the channel 1 card 2

I do not understand!
Can you help me?

Thank you

The DLL versions 2 and 3 support SetCurrentDevice(card_address) function call. You can use it to switch the control between the cards.
Use OpenDevice(0) and OpenDevice(1) only once in your program at the beginning.
Use the CloseDevice() only once in your program before the exit.

Thank you for your reply.

OK, I do OpenDevice (0) and OpenDevice (1) the beginning of the program,
On each button, I
SetCurrentDevice (card_address) and SetDigitalChannel (chanel)

I test this WE.
Thank you
JP

VELLEMAN, I obtained a copy of version 3.02 of K8055.dll so that I can try SetCurrentDevice. I need to manage 4 boards. I can’t find the declaration for this function. I’m using VB6. I tried:

Private Declare Function SetCurrentDevice Lib “k8055d.dll” (ByVal Card_Address As Long)

but the entry point can’t be found. There is a SetCurrentDevice entry in the dll export table. I found nothing defining the declaration for any language in the V2 pdf file. There was no pdf file in the ver 3 release.

Duh - never mind. I forgot to place the new K8055D.dll file in windows/system32. Sometimes I have mistaake free days - really…

[quote]I found nothing defining the declaration for any language in the V2 pdf file. There was no pdf file in the ver 3 release.[/quote]You can find the declaration of the new functions (e.g. SetCurrentDevice) on p.11 of the manual for the DLL Rev.2.0.