Problem with PCAN-USB speed

USB to CAN Interface
Fojtik
Posts: 30
Joined: Thu 8. Feb 2018, 13:06

Problem with PCAN-USB speed

Post by Fojtik » Thu 8. Feb 2018, 13:36

I have 1100 messages to transmit and 350 messages to receive at bitrate 1Mbit/s. It works fine.

But when I want to increase messages sent, the device does not allow me it. Is there any limit how many messages could be sent through PCAN-USB? Theoretically I could thansmit more than 10000 messages/s on rate 1Mbit/s.

May be that firmware update might help.
May be that PCIe card should be used instead of PCAN-USB.
Last edited by Fojtik on Thu 8. Feb 2018, 13:55, edited 1 time in total.

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

Re: Problem with PCAN-USB speed

Post by M.Maidhof » Thu 8. Feb 2018, 13:44

Hi,

which PCAN-USB version do you use? A PCAN-USB with SJA1000 CAN Controller (PCAN-USB, PCAN-USB-ISO) can only send appr. 6800msg/s at 1Mbit/s with dlc=8 (due to the fact that only one transmit register is available in the CAN-Controller). Newer Devices like PCAN-USB-FD or PCAN-USB-Pro FD can transmit up to 8000msg/s at 1Mbit/s with dlc=8. Of course all those transfers will only be possible when there is no other traffic on the CAN in that moment.

regards

Michael

Fojtik
Posts: 30
Joined: Thu 8. Feb 2018, 13:06

Re: Problem with PCAN-USB speed

Post by Fojtik » Thu 8. Feb 2018, 16:17

M.Maidhof wrote:which PCAN-USB version do you use?
There is written IPEH-002021 59658 on that Peak converter.

Anyway, even when we have older Peak, we have throwput not 6000msg/s but 4 time less 1500msg/s. Is there any change that firmware update would help?

May be that the throwput is somehow interfered with operating system.

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

Re: Problem with PCAN-USB speed

Post by M.Maidhof » Thu 8. Feb 2018, 18:05

Hi,

this is a PCAN-USB with FW 2.8 (official release version) and a SJA1000 CAN-Controller.
As a test, please use PCAN-View and transmit 6 frames with 8 databytes and 1ms, and see what happen.

regards

Michael

Fojtik
Posts: 30
Joined: Thu 8. Feb 2018, 13:06

Re: Problem with PCAN-USB speed

Post by Fojtik » Fri 9. Feb 2018, 11:55

Excuse me, see image on attachment. It is from my external embedded device that measures how many messages has been received. It demonstrates stable rate 6000 msgs/s.
CAN_Speed.gif
CAN_Speed.gif (42.96 KiB) Viewed 21459 times
It seems to be a problem of my software. But there is still one hardware related problem, see next message.
Last edited by Fojtik on Fri 9. Feb 2018, 15:00, edited 2 times in total.

Fojtik
Posts: 30
Joined: Thu 8. Feb 2018, 13:06

There is still one problem in PEAK architecture

Post by Fojtik » Fri 9. Feb 2018, 13:34

........ Erased: I do not want to confuse any reader by this post .......
Last edited by Fojtik on Sat 17. Feb 2018, 11:50, edited 1 time in total.

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

Re: Problem with PCAN-USB speed

Post by M.Maidhof » Mon 12. Feb 2018, 14:30

Hi,

thanks for the info. Unfortunately I don´t know what your diagram means, and how it was measured. PCAN-View uses the driver buffer, to store periodical signals in the driver. The driver buffer can handle up to 32767 tx messages, which will be transmitted even when you pause the transmission (until the buffer is empty!). But even with the driver buffer fully loaded, the transmit buffer should be empty after appr. 5 seconds (appr. 6000msg/s), when there is no other load on the CAN bus. Press the reset button to flush that buffer.

For me this looks like an USB3 driver problem or similar. When using Windows 7, please check your USB chipset drivers for updates.

regards

Michael

Fojtik
Posts: 30
Joined: Thu 8. Feb 2018, 13:06

Re: Problem with PCAN-USB speed

Post by Fojtik » Mon 12. Feb 2018, 14:44

I has been written notes in a chart image. 'x' axis contains seconds and 'y' axis contains messages during given second timeframe. Measuring is simple, the external device has a message counter and a counter is pushed to a chart every second. Then it is nulled for a new second frame.

Even 5 seconds of buffer is not acceptable for our application. We need latency like 5ms or less - it should be three orders faster. Anyway up to the speed 1000msg/s we did not note remarkable delay.

Is it possible that a situation improves when PCIe card would be used? If yes we would buy it.
Is it possible that firmware upgrade might decrease latency?

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

Re: Problem with PCAN-USB speed

Post by M.Maidhof » Mon 12. Feb 2018, 17:10

Hi,

this buffering will only be visible, when you write more messages to the driver, than the CAN-Controller could transmit in that time. When using one of our APIs, you can call the CAN_Reset() API to flush the buffer.

I still don't understand your problem. First it was a to slow transmitting (which was an application based problem). Now you oversend messages (more than the CAN-Controller could handle). How should this be fixed? Maybe it will be helpfull to contact us by email or phone, to discuss your problem more precise.

regards

Michael

Fojtik
Posts: 30
Joined: Thu 8. Feb 2018, 13:06

Re: Problem with PCAN-USB speed

Post by Fojtik » Mon 12. Feb 2018, 18:51

I will try to contact you directly.

Just in short. The main task is to realise control loop.
You have to send cca 15 messages and receive 5 messages from system. Everything worked fine when we have 20ms frame. So you can see that USB works fine. But somebody ordered me to speed thinks up.

Once there occurs delay, the controll process will be affected. This defect is called by the term "transport delay". First time I suspect that it is a problem of speed. But you prove me that I was wrong, the mesage speed is OK. The problem did not vanish so I am pretty sure that there is problem with message delay that is increasing when message flow increases.

If I use PCAN-USB for signal generation only I will never note this.

CAN_Reset() will not help at all because you loose everything cached.

Locked