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

2 vues (au cours des 30 derniers jours)
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?

Réponses (1)

Harimurali
Harimurali le 7 Fév 2024
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:

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by