The implementation of DM2 messages in the "DM1_DM2_Tx_Rx" function block is flawed. Below are two examples. These examples were created using J1939 Library 10104786v222, GUIDE version 5.0.8.2, and MC024-010 version 10103714v180.
One active DTC (SPN 1)
Three previously active DTCs (SPN 2,3,4)
DM1 message is correct
DM2 message is incorrect (it includes the active DTC)
6 0FECA 8D->* 8 00 00 01 00 00 02 FF FF 17820.696800 R
6 0FECA 8D->* 8 00 00 01 00 00 02 FF FF 17821.695840 R
7 0EA00 11->8D 3 CB FE 00 17822.665820 R
6 0EC00 8D->FF 8 20 12 00 03 FF CB FE 00 17822.694880 R
6 0EB00 8D->FF 8 01 00 00 01 00 00 02 02 17822.794780 R
6 0EB00 8D->FF 8 02 00 00 01 03 00 00 01 17822.894690 R
6 0EB00 8D->FF 8 03 04 00 00 01 FF FF FF 17822.994590 R
6 0FECA 8D->* 8 00 00 01 00 00 02 FF FF 17823.693920 R
6 0FECA 8D->* 8 00 00 01 00 00 02 FF FF 17824.692960 R
-------------------------------------------------------------------------
Two active DTCs (SPN 1,2)
Two previously active DTCs (SPN 3,4)
DM1 message is correct
DM2 message is incorrect (corrupt TP message and empty single frame message)
6 0EC00 8D->FF 8 20 0A 00 02 FF CA FE 00 18100.427490 R
6 0EB00 8D->FF 8 01 00 00 01 00 00 02 02 18100.527390 R
6 0EB00 8D->FF 8 02 00 00 02 FF FF FF FF 18100.627300 R
6 0EC00 8D->FF 8 20 0A 00 02 FF CA FE 00 18101.426530 R
6 0EB00 8D->FF 8 01 00 00 01 00 00 02 02 18101.526430 R
6 0EB00 8D->FF 8 02 00 00 02 FF FF FF FF 18101.626340 R
7 0EA00 11->8D 3 CB FE 00 18102.382300 R
6 0EC00 8D->FF 8 20 0A 00 02 FF CA FE 00 18102.425570 R
6 0EB00 8D->FF 8 01 00 00 01 00 00 02 02 18102.525470 R
6 0EB00 8D->FF 8 02 00 00 02 FF FF FF FF 18102.625380 R
6 0EC00 8D->FF 8 20 12 00 03 FF CB FE 00 18103.424610 R
6 0EB00 8D->FF 8 01 00 00 01 00 00 02 02 18103.524510 R
6 0FECB 8D->* 8 00 00 00 00 00 00 FF FF 18103.624420 R
6 0EB00 8D->FF 8 03 04 00 00 01 FF FF FF 18103.724320 R
6 0EC00 8D->FF 8 20 0A 00 02 FF CA FE 00 18104.423650 R
6 0EB00 8D->FF 8 01 00 00 01 00 00 02 02 18104.523550 R
6 0EB00 8D->FF 8 02 00 00 02 FF FF FF FF 18104.623460 R
Any feedback is appreciated.
Daniel