MotoHawk SAEJ1939 PGN Receive Raw

This block sets up a raw PGN Receive message using the specified handler.

Block ID

MotoHawk SAEJ1939 PGN Receive Raw

Library

MotoHawk_Protocols_lib

Description

The "PGN Definition" script is required to follow the template outlined in the "motohawk_saej1939_pgnrx_raw_example" example file.

The definition script specifies information needed to receive the desired PGN and data.

The block, when executed, provides the application with the oldest received PGN information via the ports on the block. This information includes the length of the received data, the source address that sent the data, and a vector of the received data. The data available port will return one (1) if the information has not been accessed previously and zero (0) if the data has been accessed previously, or if no data has yet been received. If no data has been received then the length will report zero (0) and the supplied data will be indeterminate.

The definition script allows for a receive queue to be defined. When the queue is full, matching received PGN's will be NACKed with a busy status

The definition script also allows for fields of data to be defined and output into separate ports. When a field is defined, the relevant bits of data from the received message will be output onto a port. The raw data can be scaled and units defined and displayed on the block. Please see the sample definition scripts to see how to define field relevant data.

The receive PGN block can optionally provide the CAN message ID as an output port for use within an application. This extra port is enabled via the definition script. This can be used for single frame receive PGN's only (max length field of 8 or less).

The receive PGN can be configured to forward J1939 frames to a UDS protocol instance referenced by a J1939 instance definition. When forwarding a J1939 frame to a UDS protocol handler, the J1939 receive PGN block will not allow executions of that block to retrieve any data sent on that PGN and any block ports will not be available. The queue size for holding incoming PGN's will also be set to one as any received PGN will be forwarded to the UDS handler instance when it is received.

Block Parameters

Parameter Field Values Comments/Description
PGN Definition String Evaluates to a PGN Receive Raw definition specified in the example script.