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

1 次查看(过去 30 天)
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 个评论
Nico van Leeuwen
Nico van Leeuwen 2021-1-5
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

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2020-8-11
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 个评论
Jochen Schenek
Jochen Schenek 2020-8-12
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 2020-8-12
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.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by