J1939 Communication over CAN, J1939 Protocol Stack

275 Views Asked by At

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 the steps 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 tab. I am not about the Network management tab content, where I have put Arbitrary Address Capable
  3. J1939 Protocol Stack: Not sure what I can connect to the inputs or outputs of the block: 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
  6. Setup block CAN-AC2-PCI B1 FIFO: CAN1 / CAN2 to manage the CAN board which also seem to be OK

At the moment with the way I configured them, I am seeing any frame sent on the bus.

Can anyone share with me how to configure the blocks?

Many thanks for your support.

0

There are 0 best solutions below