J1939 Communication over CAN, J1939 Protocol Stack

조회 수: 12 (최근 30일)
Omar Kdj
Omar Kdj 2021년 9월 14일
답변: Dimitri MANKOV 2022년 7월 7일
Dear community
I need some guidance on how to use the J1939 library for the Simulink Real-time toolbox.
I am using the previous version which is 6.7 (R2017b). There is very little documentation or example on it.
What I want to achieve is to send a CAN message on the channel 1 and receive it on channel 2.
Can anyone share a model screenshot on how to send a frame, with the setup of the different blocks.
In my model I have considered the blocks:
  1. J1939 Database where I added the dbc and it is fine
  2. J1939 Controller Application : I just used the General tabm not the Network management tab where I have put Arbitrary Address Capable, not use on the impact though
  3. J1939 Protocol Stack: Not sure what I can put at the input CAN Msg and N?
  4. J1939 Transmit message, I added the frame and it seems ok
  5. J1939 Receive message, I also added the same frame and the block seems ok too
At the moment with the way I configured them, I am seeing any frame sent on the bus.
Many thanks for your support.
  댓글 수: 1
Kenny Nona
Kenny Nona 2022년 6월 28일
Hello,
I use speedgoat with IO612 as CAN card with Matlab R2021a. This card supports J1939 messages, but I cannot find an example to help me with the implementation. I use the following blocks:
  • CAN setup
  • J1939 Network configuration (select dbc file & define config name)
  • J1939 Node configuration (specify node name, node address, etc)
  • J1939 CAN transport layer: What do I connect to the inputs and outputs of this block?
  • J1939 Receive/Transmit: outputs/uses the signals in the selected messages.
Deleting the CAN transport layer block causes an error that I need to include the block. But keeping it in provides an error that I need to connect something to the inputs, but I don't know what.
Thanks in advance,
Kenny

댓글을 달려면 로그인하십시오.

답변 (1개)

Dimitri MANKOV
Dimitri MANKOV 2022년 7월 7일
Hi Omar and Kenny,
Speedgoat have just released a series a product examples in the latest Speedgoat I/O Blockset version (v9.4.1), including an example showing how to use J1939 in Simulink Real-Time in R2020b and later.
You can find more information about this example here.
I hope this is helpful!
Dimitri

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by