J1939 manager DM1 message reading

BY
2021-12-07
2024-09-18
  • BY - 2021-12-07

    Hi All,

    I implemented J1939 manager to my project and send/receive J1939 messages via this manager. But when I want to read DM1 message which is multipackage (more than 8 byte), I can not add thsi message to the P2P RX Signals section. Is there a way to read DM1 message via this J1939 manager?

     
  • agilename - 2024-09-05

    https://content.helpme-codesys.com/en/CODESYS%20CANbus/_can_f_j1939_diagnosis_application.html

    you need this :
    VAR
    J1939_ECU:j1939.J1939RemoteECUDiag;
    DM1_ :j1939.DM1_Read;
    DTCliste : J1939.idtchandlerList;
    DTCWriter : j1939.DTCBufferWriter;
    arDTC:ARRAY[0..MaxDTC]OF j1939.DTC;
    END_VAR
    VAR CONSTANT
    MaxDTC:UDINT :=100;
    END_VAR
    DM1_(
    xEnable:=TRUE,
    xDone=> ,
    xBusy=> ,
    xError=> ,
    itfSourceECU:= J1939_ECU, //My CAN J1939 ECU
    itfDTCHandlerList=> DTCListe ,
    udiDTCCount=> ,
    MalfunctionIndicatorLamp=> ,
    RedStopLamp=> ,
    AmberWarningLamp=> ,
    ProtectLamp=> ,
    xReceived=> ,
    eError=>
    );

    DTCWriter(
    xEnable:= TRUE,
    itfDTCHandlerList:=DM1_,
    eError=> ,
    pDTCBuffer:=ADR(arDTC) ,
    udiDTCBufferCount:=MaxDTC ,
    udiDTCReceiveCount=> ,
    udiDTCLostCount=> ,
    xReceived=>
    );

     
  • kd50 - 2024-09-18

    Hi,

    Could you please give me some information about how l can practice on DM1 topic at home? Is there any small product l can buy so that l could practice on it?

     

Log in to post a comment.