Raptor-Dev-J1939-Transport-Protocol
New Eagle > Products Wiki > Raptor Platform > Raptor-Dev > Raptor-Dev J1939 Library > Raptor-Dev J1939 Transport Protocol
The transport protocol blocks make up the fundamental components of the J1939 library. These blocks interface with the Raptor CAN blocks and allow transmitting and receiving multi-frame PGNs. These blocks include a trigger mechanism to support the request of PGNs. If a PGN trigger for the requested PGN does not exist, or is unavailable, the request will be automatically NACKed. They can be used to interface new PGN messages with the J1939 transport protocol.
Blocks
Block | Description | Appearance |
---|---|---|
PGN ID |
This block assembles a source address, destination address, priority and PGN into a J1939 message id. |
|
Source Address |
Outputs the current source address. |
|
Parse CAN ID |
This block outputs the destination and source address of a message. |
|
PGN Enable |
This block is used to get the enable status of a PGN. This block will include a Raptor Adjustment and Measurement in the model which can be used to control and view the enable/disable state of a PGN. This block should only be used once in a model for a given PGN and J1939 bus. |
|
PGN Enable - No Cal |
This block is similar to the raptor_j1939_pgn_get_enable_block except it does not include a Raptor Adjustment or Measurement to display the state of the enable state. This block also allows the reading of the master enable state. Use this block to get the enable status of a PGN if a raptor_j1939_pgn_get_enable or raptor_j1939_pgn_trigger block already exists in the model for the given PGN and J1939 bus. |
|
PGN Request Slot |
This block outputs the source and destination address of the PGN request message. Use this block inside the function call subsystem executed by a PGN trigger to determine the source of the request. The output of this block is only valid in the above mentioned function call subsystem. |
|
PGN Set Enable |
This block is used to set the enable status of a PGN. This can be used to disable a PGN from transmitting. This will also disable the request trigger and send the appropriate NACK when the PGN is requested. The Master Enable can be used to disable all communication while maintaining individual PGN enable/disable states when re-enabled. |
|
PGN Trigger |
The PGN trigger block is used to trigger a message to be sent when it is requested. This block will execute the function connected to it's output when a Request message is received for the specified PGN and the PGN is enabled. If the controller has not successfully acquired an address this output will not be executed. This block includes a Raptor Adjustment and Measurement to show the enable state of the PGN and allow it to be disabled. Only one PGN trigger block can be included in the model for any given PGN and J1939 bus. |
|
PGN Trigger - No Cal |
The PGN trigger no cal block is similar to the raptor_j1939_pgn_trigger block except it does not place a Raptor calibration or probe in the model. |
|
Tx ACK/NACK |
This block is used to send an ACK or NACK message. |
|
Request Response Address |
This block outputs the source and destination addresses that should be used for the response to a PGN request. Use this block inside the function call subsystem of a PGN trigger to drive the source and destination ports of a J1939 message transmission. |
|
Transport Protocol |
The transport protocol block is similar to the Raptor CAN Definition block. This block will include the Raptor J1939 protocol stack in your model. This is necessary to facilitate all J1939 communication. The J1939 bus name defined in this block will be used in all other Raptor J1939 blocks to link the block to a specific J1939 bus. Multiple transport protocol blocks can be included on the model to facilitate J1939 communication on multiple CAN buses or on a single CAN bus with multiple addresses. The transport protocol block must be inside a periodically triggered subsystem. It is recommended that the block be inside a subsystem executing at the Foreground loop rate in order to best maintain the timings required for J1939. |
|
TP Receive |
This block is similar to the Raptor Read CAN Raw block; however it is designed to work for J1939 communication. This block is used to receive the raw bytes of a PGN. This block supports both multi-frame and single frame J1939 formats. If the PGN being received is always sent as a single frame message, it may be better to use the New Eagle Network Toolbox to receive the message do to the additional memory requirements of this block to support multi-frame messages. |
|
TP Rx Trigger |
This block is similar to the MotoHawk CAN Receive Slot Trigger; however it is designed to work for J1939 communication. It will execute its function call output whenever the transport protocol receives a message with the specified PGN. |