How can use two pcan-usb via pcan light

CAN Software API for Windows®. REGARD! This API is out-dated. Please use PCAN-Basic for new software developments.
Post Reply
amirb
Posts: 4
Joined: Thu 21. May 2015, 10:27

How can use two pcan-usb via pcan light

Post by amirb » Thu 21. May 2015, 10:43

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.

K.Wagner
Software Development
Software Development
Posts: 767
Joined: Wed 22. Sep 2010, 13:36

Re: How can use two pcan-usb via pcan light

Post by K.Wagner » Thu 21. May 2015, 10:56

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.
Best regards,
Keneth

amirb
Posts: 4
Joined: Thu 21. May 2015, 10:27

Re: How can use two pcan-usb via pcan light

Post by amirb » Thu 21. May 2015, 12:08

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?
Attachments
error-pcan_2usb.png
error-pcan_2usb.png (16.2 KiB) Viewed 7103 times

K.Wagner
Software Development
Software Development
Posts: 767
Joined: Wed 22. Sep 2010, 13:36

Re: How can use two pcan-usb via pcan light

Post by K.Wagner » Thu 21. May 2015, 12:17

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.
Best regards,
Keneth

amirb
Posts: 4
Joined: Thu 21. May 2015, 10:27

Re: How can use two pcan-usb via pcan light

Post by amirb » Thu 21. May 2015, 12:40

Yes, all right.
Again, Thank you in advance.

Post Reply