"receive" command of the "Vehicle Network Toolbox" does not track more than 546 points in Matlab

1 view (last 30 days)
Hello everybody!
my problem is that I do not receive more than 546 points in time (approximately 2.00sec) with the "Vehicle Network Toolbox":
if I execute follwing commands in Matlab:
rxCh = canChannel('PEAK-System','PCAN_USBBUS1');
start(rxCh);
rxMsg = receive(rxCh, Inf, 'OutputFormat', 'timetable');
I do expect more tracked data which I have to stop with following command:
stop(rxCh);
If I replace "Inf" with a number lower than "546", the corresponding points in time are tracked. However, I cannot exceed "546".
Best regards,
Jochen
  1 Comment
Nico van Leeuwen
Nico van Leeuwen on 5 Jan 2021
Hi Jochen,
Have you found a solution to this problem? I have encountered the same issue and have not been able to receive more than 579 messages.
It indeed seems to be a time-bound issue, since I only receive 2 messages if I filter based on a channel ID of which I know updates once per second. Thanks for sharing the use of filterAllowOnly, that was at least worth a try. I am curious if you have been able to find an extensive solution to this issue.
Kind regards,
Nico

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 11 Aug 2020
receive() is limited to returning messages that are already queued.
We can therefore detect that in the system you tested, the size of the queue was no more than 546 messages.
I can speculate that the actual restriction might be a certain amount of memory, so using a different payload size might potentially change the exact count you get.
  4 Comments
Jochen Schenek
Jochen Schenek on 12 Aug 2020
I've tried this example with MathWorks Virutal CAN channels:
If following command is entered:
rxMsg = receive(rxCh, Inf, 'OutputFormat', 'timetable');
The number of received messages is limited to 388 despite 'Inf'.
Is there any chance to receive much more data?
Best regards,
Jochen
Walter Roberson
Walter Roberson on 12 Aug 2020
My main Windows virtual machine is broken; it may be some time before I can launch Windows to investigate further.
Possibly someone else has ideas of what the cause of the limits is.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!