Documentation search search close
CONTENTS
https://www.speedgoat.com/help/slrt/page/icon_documentation.jpg
v10.0.1.x for R2026a
View other versions

SENT - SENT Tx v1

SENT - SENT Tx v1 — The SENT Tx transmits data according to SAE J2716 protocol..

Library

Simulink Real-Time - Speedgoat

Description

The SENT Tx block transmits fast and enhanced serial messages over the SAE J2716 protocol.

Ports

The Simulink block has up to 6 input ports:

Inputs
fast msg status

This port controls bit 0 and 1 of the SENT status nibble.

fast msg 1

This port is the first fast message of the SAE J2716 protocol. The data type is uint16 and data is aligned on the LSB (bit 0).

fast msg 2

This port is only displayed when the current data format parameter enables the second fast message. This input is the second fast message of the SAE J2716 protocol. The data type is uint16 and data is aligned on the LSB (bit 0).

serial msg Config

This port is only visible when Enable Enhanced Serial Message is set.

This port is the configuration bit of the enhanced serial data message. When this port is equal to 0, the ID is coded on 8-bit and the data is coded on 12-bit. When this port is not equal to 0, the ID is coded on 4-bit and the data is coded on 16-bit.

serial msg ID

This port is only visible when Enable Enhanced Serial Message is set.

This port is the ID of the enhanced serial data message. The port is a uint16 and the relevant ID data must be written on bits 7 to 0 when serial msg Config is set to 0 (respectively on bits 3 to 0 when serial msg Config is not set to 0).

serial msg data

This port is only visible when Enable Enhanced Serial Message is set.

This port is the data of the enhanced serial data message. The port is a uint16 and the data must be written on bits 11 to 0 when the serial msg Config is set to 0 (respectively on bits 15 to 0 when the serial msg Config is not set to 0).

Outputs
serial msg buffered

This port is only visible when Enable Enhanced Serial Message is set.

The port is boolean. The SENT TX driver uses a buffer for the enhanced serial message. In case a new enhanced serial message is buffered and being sent with the next following 18 SENT frames, this port is set high in the present simulation step of the real-time application. That means whenever this port is high, the inputs serial msg Config, serial msg ID and serial msg data can be set to the values of the next message.

Parameters

Tab: Module setup
Configurable I/O Module ID

This parameter associates a code module block with a configurable I/O module setup block. Set this value to match the Module ID defined in the setup block of the required configurable I/O module.

Channel Vector

A vector of channels this driver block entity will access. You can specify channels in the range 1-N (N = the number of channels implemented in your specific configuration file defined in the Setup block). The width of this vector also defines the subsequent size of some of the following parameters if scalar expansion applies. With a single block, all the channels of the block are synchronized.

Sample Time

Defines the base sample time at which this driver block gets its sample hit. This parameter can also be set to -1 for inherited sample time. The units are in seconds.

Tab: SENT
Tick Length Vector

Defines the transmitter-specific unit time (time of one SENT tick) between 1 microsecond and 90 microseconds. The units are in seconds.

SPC Mode

Defines whether SENT SPC is disabled or which SPC mode is used. Following settings are available (See SAE J2716 protocol for details):

  • Disabled

  • Synchronous

  • Synchronous with range selection (range = 200 mT)

  • Synchronous with range selection (range = 100 mT)

  • Synchronous with range selection (range = 50 mT)

  • Synchronous for ID 1

  • Synchronous for ID 2

  • Synchronous for ID 3

  • Synchronous for ID 4

SENT Data Format

Defines the Data format of the messages to encode.

  • Two 12-bit fast channels, fast message 1 and fast message 2 (H.1)

  • One 12-bit fast channel, fast message 1 only (H.2)

  • High-speed with one 12-bit fast channel, fast message 1 only (H.3)

  • Secure sensor with one 12-bit fast channel, fast message 1 and secure sensor information on fast message 2 (H.4)

  • Single sensor with one 12-bit fast channel, fast message 1 and zero value on fast message 2 (H.5)

  • One 14-bit channel, fast message 1 and one 10-bit channel, fast message 2 (H.6)

  • One 16-bit channel, fast message 1 and one 8-bit fast channel, fast message 2 (H.7)

  • Custom Protocol, one fast message, selectable data width using the parameter Number of Data Nibbles

Number of Data Nibbles

This parameter is only visible when SENT Data Format is set to Custom Protocol.

This parameter defines the amount of data nibbles being transferred with the SENT frame and can be set to a number between 2 and 8. Each nibble transports 4 bits, therefore the user data can be set with between 8 and 32 bits in step of 4 bits.

Sync Mode

This parameter is only visible when SPC Mode is set to Disabled.

When set, the SENT TX frame is triggered once at each step of the real time application. In case the real-time application step triggers the SENT TX frame but the previous frame was not yet finished, the ongoing SENT TX frame is not interrupted and the present real-time application step does not trigger a new frame. Once the SENT TX frame is finished, an additional pause pulse is inserted until the next frame trigger is commanded.

When not set, the SENT TX frame is continuously transferring data.

Variable LOW Time

Regarding the SAE J2716 protocol, each pulse starts with a falling edge and must remain low for least 4 ticks. The point of time for the rising edge is not defined. The standard implementation of the SENT TX module is always generating 5 ticks low and for the rest of the pulse, the signal is high.

When this parameter is set, the SENT TX signal will be low until the last 5 ticks of each pulse where the signal then is set high. More details can be seen in the usage notes.

Enable Pause Pulse

This parameter is only visible when SPC Mode is set to Disabled and Sync Mode is not set.

When set, an optional pause nibble will be generated at the end of each SENT transmission.

Variable Pause Length

This parameter is only visible when Enable Pause Pulse is set.

When set, the pause nibble length is adjusted so that the total frame length (inclusive sync, status, data, CRC and pause nibble) equals the below defined Pause Length.

Pause Length Vector

This parameter is only visible when Enable Pause Pulse is set. The effect of this parameter depends upon:

  • Variable Pause Length is set:

    The length of the pause nibble is adjusted so that the total frame length (in number of SENT ticks) equals this parameter. In case this parameter is set to less than the frame length, the pause nibble length of the SENT message is set to the lowest possible value (12 ticks).

  • Variable Pause Length is not set:

    The length of the pause nibble is fixed to the value of this parameter (in number of SENT ticks).

Enable Enhanced Serial Messages (Slow Message)

When set, bits 2 and 3 of the SENT status nibble are used to transmit the enhanced serial message (also called slow message). The enhanced serial message is multiplexed with 18 consecutive SENT messages as described in the SAE J2716 protocol.

CRC Calculation Type

Defines the calculation type of the checksum of the fast message

  • Recommended CRC:

    All data nibble values are passed through the CRC calculation to generate the CRC checksum.

  • Legacy CRC:

    All but the last data nibble values are passed through the CRC calculation. This temporary checksum is binary XOR processed with the last data nibble which then is the final CRC checksum result.

Include Status Nibble

When set, the status nibble value will be included in the CRC calculation. When not set, the CRC calculation is only based on the fast messages data values.

Use Default CRC Configuration

When set, the value of the CRC polynomial is set to the default value x4 + x3 + x2 + 1 and the CRC initial value is set to 0b0011 as defined by the SAE J2716 protocol. When not set, the Polynomial Vector and the Init Vector can be used to set a user-specific CRC calculation

Polynomial Vector

This parameter can only be set to a specific value when Use Default CRC Configuration is not set.

The SENT protocol uses a 4-bit CRC calculation. This parameter therefore is a 4-bit value that builds the CRC polynomial as following: x4 + Bit3*x3 + Bit2*x2 + Bit1*x1+ Bit0

Init Vector

This parameter can only be set to a specific value when Use Default CRC Configuration is not set.

This parameter defines the initial value of the CRC calculation.

[Note]Note

The SAE J2716 protocol defines a seed value that is not the same. The initial value is the CRC checksum of the seed value only.

For example, using the standard SAE J2716 CRC Polynomial x4 + x3 + x2 + 1, the seed value 0b0101 will generate a CRC checksum of 0b0011, therefore 0b0011 is the corresponding initial value.