Documentation

J1939 Receive

J1939 Receive (not recommended)

Library

Simulink® Real-Time™ Library of Drivers No Longer Recommended for Use

Description

The J1939 Receive block receives the PGNs.

Block Inputs

Connect the J1939 Receive block directly to the output of a CAN FIFO Read block. The input signal is a matrix of size m x 6, where m is the FIFO read depth defined in the FIFO Read block dialog box. Each row with its six elements contains the information defining a CAN message:

Port
Identifier
Event type
Data frame size
Timestamp
Data

See one of the FIFO Read blocks (for example, Softing CAN-AC2-PCI with Philips SJA1000 FIFO Read) for a detailed description of these elements.

Block Outputs

The number of parameter group numbers (PGNs) in the PGN list parameter determines the number of block outputs. The block creates and labels an output port for each PGN in the list. Each output signal is a vector of unsigned bytes with a length of 16. The bytes are defined as follows:

BitDescription
y[1]

Protocol data unit format (PDU format or PF)

y[2]

Group extension if PF is greater than 240, else destination address (DA)

y[3]

Source address

y[4]

Timestamp[0]

y[5]

Timestamp[1]

y[6]

Timestamp[2]

y[7]

Timestamp[3]

y[8]

Data byte 1

y[9]

Data byte 2

y[10]

Data byte 3

y[11]

Data byte 4

y[12]

Data byte 5

y[13]

Data byte 6

y[14]

Data byte 7

y[15]

Data byte 8

Block Parameters

CAN Port

Select the filter criterion for the CAN port. From the list, select Any, 1, or 2.

PGN List

Enter the acceptance filter criterion for the parameter group number (PGN). Enter a list of PGNs that you want to receive. You can provide a set of PGNs as a row vector.

When the CAN FIFO blocks receives the data that corresponds to these PGNs, they filter these messages and send them to the J1939 Unpack block.

CA Address

Enter the filter acceptance criterion for the specified controller application ID. Only messages whose destination addresses match the current controller application address or the global address will be routed to a PGN output.

Was this topic helpful?