Hi…
I am trying to connect 2 wm110 usb interfaces at the same time, to the same program. But nomatter what i do, all the commands from the program, goes to Interface(1), Interface(0) is completely untouched by the commands… Isn´t possible to use two interfaces at the same time ?
Running two units with the same address will not work.
You will have to select different addresses.
Please check the help file of the DLL, it explains how to access multiple devices.
I have selected different adresses… master is = 0 , and slave is = 1
both in my programming and on the interfaceses…
I can easely access both interfaces at the same time, from two different programs… but not from the same… ?
[quote=“VEL417”]Running two units with the same address will not work.
You will have to select different addresses.
Please check the help file of the DLL, it explains how to access multiple devices.[/quote]
I don’t think the K8055 dll supports multiple devices because OpenDevice and CloseDevice don’t return/accept a device handle. OpenDevice probably saves the handle as a global variable inside the dll. This is why it would work if you have two seperate applications: because their process space is not shared.
So, i’m afraid not, unless i looked at the manual for a different or older dll.
I think i have figured it out…
They can run on seperate dll-files… If I make 2 dll-files… one called “K8055a.ddl” and one called “K8055b.dll”. And declare OpenDevice(0) as K8055a.dll, and OpenDevice(1) as K8055b.dll, it works…
It would however have been nice if the SetDigitalChannel()-command had contained a reference to which card it is adressed to. Like SetDigitalChannel(CardAddress as integer, Channel as Integer).
Thought I would post what I think the answer is, in case someone else ends up with the same problem…
You found a solution.
Other solution is to use the latest K8055 DLL from the Velleman downloads site.
There in the DLL is a function: SetCurrentDevice
You can use it to switch the control between the cards.
Private Declare Function SetCurrentDevice Lib “k8055d.dll” (ByVal CardAddress As Long) As Long
Nice trick using different dll names lol