PCAN-USB Message Duplication Problem

USB to CAN Interface
Post Reply
Emre220601
Posts: 2
Joined: Wed 18. Oct 2023, 14:52

PCAN-USB Message Duplication Problem

Post by Emre220601 » Wed 18. Oct 2023, 15:26

Hello,

I'm currently using three PCAN-USB devices connected to a PCAN-Router Pro. I'm working on reading and writing data using Python with the PCANBasic.py API.

However, I'm encountering an issue. When I attempt to send a message with my second PCAN-USB device, it also sends the same message via the first PCAN-USB device. I'm unable to separate between these two PCAN-USB devices. When I send a message exclusively to my first PCAN-USB, it works as expected. However, when I send it to the second PCAN-USB, it sends the message with both devices.
I have already configured each PCAN-USB device with a unique ID and added them to my registry editor.

Has anyone experienced a similar issue and found a solution?

Thank you!

Best regards,
Emre

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-USB Message Duplication Problem

Post by M.Maidhof » Wed 18. Oct 2023, 15:32

Hello,

please provide some more details about used driver/firmware/PCANBasic version. As a test please use two instances of the PCANBasic demo application which you find in the PCANbasic package and test if you have the same behaviour with that application when using two different PCAN-USB modules.

regards

Michael

Emre220601
Posts: 2
Joined: Wed 18. Oct 2023, 14:52

Re: PCAN-USB Message Duplication Problem

Post by Emre220601 » Wed 18. Oct 2023, 16:18

Hello,

for both devices in the properties of PEAK Hardware it says 8.6. I can show a short code snippet which I'm currently using if that helps:

Code: Select all

pcan = PCANBasic()

pcan.Initialize(PCAN_USBBUS1, PCAN_BAUD_500K)
pcan.Initialize(PCAN_USBBUS2, PCAN_BAUD_500K)

while True:
    msg_1 = createPCANMessage(0x1, 6, (0x01, 0x00, 0x00, 0x00, 0x00))
    print(f"msg 1: {msg_1}")
    pcan.Write(PCAN_USBBUS1, msg_1)

    msg_2 = createPCANMessage(0x2, 8, (0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00))
    print(f"msg 2: {msg_2}")
    pcan.Write(PCAN_USBBUS2, msg_2)

    time.sleep(0.1)
Last edited by K.Wagner on Thu 19. Oct 2023, 09:04, edited 1 time in total.
Reason: Code formatting for better reading

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-USB Message Duplication Problem

Post by M.Maidhof » Wed 18. Oct 2023, 17:02

Hi,

how about the tests with the test applications and driver and API version?

regards

Michael

Post Reply