Does Vehicle Network Toolbox support message reception callback functions in J1939?

I am using the "j1939Channel" function for J1939 communication in MATLAB's Vehicle Network Toolbox. I want to implement sporadic data reception using events and callbacks, specifically with the "MessageReceivedFcn" property, similar to how it is done with "canChannel". However, I could not find any relevant samples in the documentation.
Does Vehicle Network Toolbox support message reception callback functions (such as MessageReceivedFcn) in J1939 communication using the "j1939Channel" function?

 Accepted Answer

The "j1939Channel" object in Vehicle Network Toolbox does not have the "MessageReceivedFcn" or "MessageReceivedFcnCount" properties. These properties are available only for the "canChannel" object.
If you need event-driven message reception (i.e., using callbacks) for J1939 communication, this is not directly supported with "j1939Channel". 
As a workaround, you will need to implement polling by periodically checking for new messages using a timer or loop.

More Answers (0)

Products

Release

R2023b

Tags

Community Treasure Hunt

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

Start Hunting!