Does Vehicle Network Toolbox support J1939 Transport Protocol (i.e. multipacket messages)
4 次查看(过去 30 天)
显示 更早的评论
I have used VNT for data messages that conform to the <= 8 byte max data payload but I am currently needing to read a 38 byte message. I can read the initial Broadcast Announcement Message (BAM) but need to then read the following data messages. Does the Vehicle Network Toolbox support J1939 Transport Protocol? If yes, how do you go about setting it up to receive a multipacket BAM message?
0 个评论
回答(1 个)
Harimurali
2024-2-7
Hi Jason,
The Vehicle Network Toolbox supports the J1939 transport protocol. The Vehicle Network Toolbox provides several functions for J1939 communication.
A J1939 channel and database need to be set up to receive a multi-packet BAM message in MATLAB using the Vehicle Network Toolbox. Here is a high-level overview of the steps involved, demonstrated using a MATLAB script:
% Load the J1939 database and create the channel object
candb = canDatabase('example_dbcfile.dbc') % The database should define the parameter groups and associated signals
j1939ch = j1939Channel(candb,'Vector','CANCaseXL 1',1) % Replace with the required hardware details
%start the channel
start(j1939ch);
% Receive messages
while true
msgs = receive(j1939ch, Inf, 'OutputFormat', 'timetable');
% Process the received messages
% ...
end
The Vehicle Network Toolbox also provides several blocks for J1939 communication. Refer the following documentation for information about the same:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Vehicle Network Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!