Does Vehicle Network Toolbox support J1939 Transport Protocol (i.e. multipacket messages)

5 次查看(过去 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?

回答(1 个)

Harimurali
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:

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by