Results 1 to 4 of 4

Thread: J1939_DM1RX SPN Type

  1. #1
    Join Date
    Feb 2010
    Posts
    29

    Default J1939_DM1RX SPN Type

    Function Block J1939_DM1RX output variable SPN is defined as a Word, which does not allow the full range of DTC's. SPN is a 19 bit number and requires a dword for the full range of possible values. Can this be updated? is there another way to receive?

    Suspect Parameter Number (SPN)
    A suspect parameter number is assigned to each parameter of a parameter group or component. It is used for diagnostic purpose to report and identify abnormal operation of a Controller Application (CA).
    The SPN is a 19 bit number and has a range from 0 to 524287. For proprietary parameters a range from 520192 to 524287 is reserved.

    ifm_J1939_NT\ifm_J1939_NT_v020002.lib
    FUNCTION_BLOCK J1939_DM1RX
    VAR_INPUT
    ENABLE : BOOL := FALSE; (* TRUE = FB is executed; FALSE = FB is not executed *)
    CHANNEL : BYTE; (* Select the CAN interface 1...n: see data sheet *)
    DA : BYTE; (* Destination address of ECU (254 = read DTCs of this device) *)
    ACTIVE : BOOL; (* TRUE: receive DM1; FALSE: receive DM2 *)
    END_VAR
    VAR_OUTPUT
    REDSTOPLAMP : BOOL; (* Red stop lamp: TRUE = ON; FALSE = OFF (for old projects only) *)
    AMBERWARNINGLAMP : BOOL; (* Amber warning lamp: TRUE = ON; FALSE = OFF (for old projects only) *)
    PROTECTLAMP : BOOL; (* Protect lamp: TRUE = ON; FALSE = OFF (for old projects only) *)
    NUMBER : BYTE; (* Number of received DTCs *)
    SPN : WORD; (* Suspect Parameter Number *)
    FMI : BYTE; (* Failure Mode Indicator (0...31) *)
    SPN_CM : BOOL; (* Conversion Method *)
    OC : BYTE; (* Occurence Count *)
    RESULT : BYTE; (* FB result byte:
    0 = Function block is not active
    1 = FB execution completed without error - data is valid
    8 = FB not yet executed
    242 = Error: setting is not possible *)
    MIL_FC : BYTE; (* State of the electronic component:
    malfunction indicator lamp status and flash code:
    0=Off, 1=On, 2=flash slow, 3=flash fast *)
    REDSTOPLAMP_FC : BYTE; (* State of the electronic component: red stop lamp status and flash code:
    0=Off, 1=On, 2=flash slow, 3=flash fast *)
    AMBERWARNINGLAMP_FC : BYTE; (* State of the electronic component: amber warning lamp status and flash code:
    0=Off, 1=On, 2=flash slow, 3=flash fast *)
    PROTECTLAMP_FC : BYTE; (* State of the electronic component: protect lamp status and flash code:
    0=Off, 1=On, 2=flash slow, 3=flash fast *)
    END_VAR

    VAR

  2. #2
    Join Date
    May 2009
    Location
    Minneapolis, MN
    Posts
    300

    Default

    Development has been notified.

    I normally don't use the DM_RX block. I built my own based on the J1939_Multi.

  3. #3
    Join Date
    Feb 2010
    Posts
    29

    Default

    That's my plan at the moment. Do you know if the Multi block receives the single frame message as well?

    when there is only 1 DTC it transmits on FECA as a single frame, more than 1 DTC trasmits using the multi format.

  4. #4
    Join Date
    May 2009
    Location
    Minneapolis, MN
    Posts
    300

    Default

    Yes it will still receive the single message.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •