Page 1 of 1
How can use two pcan-usb via pcan light
Posted: Thu 21. May 2015, 10:43
by amirb
I want to use 2 peak can usb devices on a pc.
Unfortunately, init function of pcan light API does not have any parameter for device number whereas PCAN View in connect window ask which device you want.
Please help me about this problem.
Re: How can use two pcan-usb via pcan light
Posted: Thu 21. May 2015, 10:56
by K.Wagner
Hello,
with PCAN-Light you can use a maximum of 2 devices of each type at a time. There is an own dll for each device. For instance, if you want to use 2 USB devices you need to use for the first one the dll "PCAN_USB.dll" and for the second one the "PCAN_2USB.dll".
Note that this API is maintained for compatibility purposes but it will not be further developed or updated. We recommmend to update your project and use the PCAN-Basic dll instead (successor of PCAN-Light). The PCAN-Basic allow to connect up to 16 channels, and it is all done with only one dll.
Re: How can use two pcan-usb via pcan light
Posted: Thu 21. May 2015, 12:08
by amirb
Thank you for your quick response.
As you said, I use PCAN_2USB.dll in second program and change HardwareType in init function to USB_2CH, but I get an error.
Should I apply any special setting on my system?
Re: How can use two pcan-usb via pcan light
Posted: Thu 21. May 2015, 12:17
by K.Wagner
It seems as you are loading a 32-Bit dll from a 64-Bit application or vise-versa. Please check that you are using the right dll.
Re: How can use two pcan-usb via pcan light
Posted: Thu 21. May 2015, 12:40
by amirb
Yes, all right.
Again, Thank you in advance.