필터 지우기
필터 지우기

Continuous Reception of CANbus Messages

조회 수: 4 (최근 30일)
David Mitchell
David Mitchell 2018년 11월 22일
I am trying to read CANbus messages from a real CANbus channel. Using the Vehicle CANbus Monitor (Vehicle Network Toolbox installed), I can receive all messages ok. However when I try to use MATLAB code, I can only receive 2 or sometimes 3 messages. Following the various examples from the Mathworks site, I am using the following code:
rxCh = canChannel('Kvaser', 'Leaf Light 1', 1);
configBusSpeed(rxCh,125000)
start(rxCh);
rxmsg = receive(rxCh, inf, 'OutputFormat', 'timetable');
My assumption is that setting the amount of messages to 'inf' should gather all the messages until I send the stop(rxCh) command? Or should I be using some sort of wait or loop to keep checking for new words?

답변 (0개)

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by