フィルターのクリア

Processing J1939 BAM messages with VNT

15 ビュー (過去 30 日間)
Charles Coulton
Charles Coulton 2022 年 10 月 14 日
コメント済み: Charles Coulton 2023 年 10 月 20 日
I'm trying to use the Vehicle network tool box to capture and process a transport protocol multi packet message.
The message is sent over BAM or broad cast, and i've created blocks to capture when RTS message goes out, but is there a method of captureing the disperate values across a set of packets and present the final thing in an array, or is it dump to the workspace and let some other script figure it out.

採用された回答

Shivam Lahoti
Shivam Lahoti 2023 年 10 月 20 日
Hi Charles,
From what I can understand, you want to process a multi-packet transport protocol over the J1939 communication channel and want to capture the disparate values across a set of packets.
The vehicle Network toolbox provides several blocks that could be used to receive packets from different communication protocols, Since the transport protocol is over the J1939 communication channel VNT has a J1939 Receive block. The J1939 Receive block receives a J1939 message from the configured CAN device. Please look at the following documentation to understand the J1939 receive block.
Along with this have a look at the following documentation’s function segment to understand the different functions available to process the transport protocol.
For example, to receive all the available parameter groups from the bus by specifying a count of Inf.:
db = canDatabase('MyDatabase.dbc')
chan = j1939Channel(db,'Vector','CANCaseXL 1',1)
start(chan)
pgrp = receive(chan,Inf)
I hope this helps.
Regards,
Shivam Lahoti.
  1 件のコメント
Charles Coulton
Charles Coulton 2023 年 10 月 20 日
Thank you! The programatic example is great. I have since found out that DBC files if they define a message as multipacket, will receive the message even if it comes in as a single packet. It does mean that you have to watch for the TP packets and use that to process what you got from multipacket parser it is much more flexiable than it seems on the outset. But that is likely more a function of the limitations of the DBC spec than of MATLAB or simulink.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVehicle Network Toolbox についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by