5.1.101. Signal gap detection (put_SignalGapDetection)

Determine discontinuities in CAN message reception.

5.1.101.1. Supported targets

All targets

5.1.101.2. Required license

None (Main library). (See Section 2.3, “Licensed Features”.)

5.1.101.3. Description

Determine whether the application:

  • is receiving a CAN message regularly (code 8); or

  • has yet to receive a CAN message (code 5); or

  • has not received a CAN message within the required start-up period (code 6); or

  • has stopped receiving the CAN message (code 7).

The block will start monitoring the status of inport u (whether a CAN message was received this model iteration or not) when the inport start_count is 1. For as long inport u is zero (no message received), the block will output code 5.

If the block observes that it has not received a single CAN message within the required module start-up period, the block will output code 6.

If the application has received at least a single CAN message within the required start-up period, but has then subsequently not received a new message for the pre-defined consecutive number of missed message periods, the block will output code 7.

For as long as the block is receiving CAN messages, the block will output code 8.

These output codes can be fed into the Section 5.1.103, “Signal validate (put_SignalValidate)” block to provide further fault detection.

5.1.101.4. Inports

  • u

    Set to 1 if the message was received this iteration, 0 otherwise.

  • start_count

    Set to 1 to cause the block to monitor the u inport, 0 otherwise.

5.1.101.5. Outports

  • u_invalid_code

    Result of monitoring when the CAN message was received over time (inport u). See the table in the notes section for a complete list of the codes.

    Range: [5, 8]

5.1.101.6. Mask parameters

  • Number of message periods for module timeout at start-up

    The number of message periods the block will wait after inport start_count has been set to 1, before reporting that it has not received a CAN message within this required period.

    Range: [0, 255] periods

  • Number of message periods for module timeout

    The number of message periods the block will wait, with inport u set to 0, before reporting that it has stopped receiving the CAN message.

    Range: [0, 255] periods

5.1.101.7. Notes

Table 5.6. CAN signal gap error codes

Invalid codeDescription
5The application has yet to receive the first CAN message (of a particular ID).
6The application has not received a single CAN message (of a particular ID) within the defined start-up timeout period.
7The application has received at least one message (of a particular ID) within the start-up timeout period, but has then subsequently not received a new message for a pre-defined number of message periods.
8The put_SignalGapDetection block is receiving the CAN message within timeout periods.