5.1.52. J1939 DM1 receive (pj1939_Dm1Receive)

Indicates if a J1939/73 DM1 message has been received and decodes the contents of the lamp status.

5.1.52.1. Supported targets

All targets

5.1.52.2. Required license

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

5.1.52.3. Description

A J1939/73 DM1 message is a variable length message, transmitted by a network node to the global network address. The DM1 message contents detail any active diagnostic trouble codes and lamp status. As the message is variable in length, direct blockset support is provided (rather than relying on the pj1939_PgReceive block).

The application model may request the DM1 message or rely on the other J1939 node to transmit the DM1 message periodically. This block does not make a request for the DM1 message.

5.1.52.4. Inports

  • sim_rx_trig_flag

    The simulation value for the outport rx_trig_flag.

    Value type:Boolean
    Calibratable:No
  • sim_error_flag

    The simulation value for the outport error_flag.

    Value type:Boolean
    Calibratable:No
  • sim_overrun_flag

    The simulation value for the outport overrun_flag.

    Value type:Boolean
    Calibratable:No
  • sim_lamp_malfunction

    The simulation value for the outport lamp_malfunction.

    Value type:Integer
    Calibratable:No
  • sim_lamp_red

    The simulation value for the outport lamp_red.

    Value type:Integer
    Calibratable:No
  • sim_lamp_amber

    The simulation value for the outport lamp_amber.

    Value type:Integer
    Calibratable:No
  • sim_lamp_protect

    The simulation value for the outport lamp_protect.

    Value type:Integer
    Calibratable:No
  • sim_timestamp

    The simulation value for the outport timestamp. Available only if the mask parameter Provide timestamp is selected.

    Value type:Integer

5.1.52.5. Outports

  • error_flag

    Set to 1 if an error in receive processing relevant to this message has occurred.

    Value type:Boolean
    Calibratable:No
  • rx_trig_flag

    Set to 1 if a DM1 message matching the source address has been received since the last time the block was evaluated, 0 otherwise.

    Value type:Boolean
    Calibratable:No
  • overrun_flag

    Set to 1 if more than one DM1 messages matching the source address have been received since the last time the block was evaluated, 0 otherwise.

    Value type:Boolean
    Calibratable:No
  • lamp_malfunction

    The state value of the malfunction lamp.

    Range: [0, 3] (0 is Slow Flash, 1 is Fast Flash, 2 is On, 3 is Off)

    Value type:Integer
    Calibratable:No
  • lamp_red

    The state value of the red lamp.

    Range: [0, 3] (0 is Slow Flash, 1 is Fast Flash, 2 is On, 3 is Off)

    Value type:Integer
    Calibratable:No
  • lamp_amber

    The state value of the amber lamp.

    Range: [0, 3] (0 is Slow Flash, 1 is Fast Flash, 2 is On, 3 is Off)

    Value type:Integer
    Calibratable:No
  • lamp_protect

    The state value of the protect lamp.

    Range: [0, 3] (0 is Slow Flash, 1 is Fast Flash, 2 is On, 3 is Off)

    Value type:Integer
    Calibratable:No
  • timestamp

    The time when the last valid message was received. Strictly this gives the time when the message was assembled from the possibly multiple CAN packets, and has a resolution of 50 ms. The timestamp is a free-running microsecond timer that wraps to zero approximately every 70 minutes. Available only if the mask parameter Provide timestamp is selected.

    Range: [0, 4294967295] us

    Value type:Integer

5.1.52.6. Mask parameters

  • J1939 Channel

    The logical J1939 channel on which the message will arrive. Must be a channel declared with a pj1939_ChannelConfiguration block.

    Value type:Integer
    Calibratable:No
  • Source address

    The source J1939 network address of the message to be received.

    Range: 0 or 253

    Value type:Integer
    Calibratable:No
  • Sample time

    The periodicity of the block execution.

    Range: [0.001, 3600] seconds

    Value type:Real
    Calibratable:No
  • Provide timestamp

    If selected then inport sim_timestamp and outport timestamp are made available.

    Value type:Boolean
    Calibratable:No

5.1.52.7. Notes

None.