Author Topic: J1939 Receiving Large Message (EC, FEE3)  (Read 608 times)

Offline AlbertMilani

  • PLUS+1 Developer
  • ***
  • Posts: 11
  • Karma: +0/-0
J1939 Receiving Large Message (EC, FEE3)
« on: January 10, 2023, 01:54:06 AM »
Hi,

Does anyone have any sample code for receiving large J1939 message that make up more than one packet?  I can't even see how where to start with this.  I've successfully sent and received smaller messages.

I specifically am trying to get the EC, FEE3 message which has 8*7 bytes of data.

Thanks,
Albert

Offline AlbertMilani

  • PLUS+1 Developer
  • ***
  • Posts: 11
  • Karma: +0/-0
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #1 on: January 10, 2023, 10:07:25 PM »
I just realized that
Topic: PGN 65259 SPN 588
https://www.plus1forum.danfoss.com/index.php?topic=1585.0
addresses my question but for a different PGN.

I'll try it soon and report back.

Albert

Offline AlbertMilani

  • PLUS+1 Developer
  • ***
  • Posts: 11
  • Karma: +0/-0
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #2 on: January 13, 2023, 02:44:40 PM »
I tried the same code from that other topic: PGN 65259 SPN 588 but I'm not seeing any attempts from the engine to send the info.  On the CAN monitor, I see my request which is similar to another request I'm making for a simple PGN that is working but the engine seems to be making no attempt to respond to the request for the large message - I don't see any EB00 packets:

Here's my request where I see it working for the simple PGN; note that I tried a different PGN, FEE3 since FEEB, 65259 wasn't working:
Code: [Select]
0    18EA002C X       3  E5  FE  00                              6.484 R
0    18EA002C X       3  E3  FE  00                              6.500 R
 ...
0    18FEE500 X       8  63  00  00  00  FF  FF  FF  FF          6.515 R

After my request for the large message PGN, should I see something like this on the CAN bus?:
Code: [Select]
0    1CEB002C X       8  01  XX  XX  ...

Thanks,
Albert

P.S.: This is not working for two different engines.
« Last Edit: January 13, 2023, 02:49:22 PM by AlbertMilani »

Offline PosFdbk~~~~~

  • PLUS+1 User
  • **
  • Posts: 8
  • Karma: +2/-0
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #3 on: February 14, 2023, 05:24:19 PM »
What is in the rest of your code?  The way the Rx block work, they "absorb" the message.  If this is added after say a DM1 Rx, it will never see the TP messages because they are already taken by DM1.   You basically have to have a central TP receiver that then distributes to places where it is used.

Anyhow, sorry for digging up an old thread, hope you solved the problem!

Offline AlbertMilani

  • PLUS+1 Developer
  • ***
  • Posts: 11
  • Karma: +0/-0
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #4 on: February 23, 2023, 05:30:52 PM »
So I can't simply use two simple multipacket message handler function blocks like DM1_Rx1 and even DM2_Rx1 in the same application?!

I was assuming when I got back to this, I'd be able to just make the Enable input false at different times but now I see these blocks don't have them!  What if I lied about the engine address to effectively disable them?  This would be ugly but so much easier.

> You basically have to have a central TP receiver that then distributes to places where it is used.
Should I be able to connect a few parsers to the same TP_RTS_CTS_Rx block?  And send different requests at different times?

> Anyhow, sorry for digging up an old thread, hope you solved the problem!
No apology is needed especially since I didn't solve my problem yet.

Thanks!
Albert
« Last Edit: February 23, 2023, 05:33:48 PM by AlbertMilani »

Offline PosFdbk~~~~~

  • PLUS+1 User
  • **
  • Posts: 8
  • Karma: +2/-0
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #5 on: February 23, 2023, 09:24:37 PM »
I think it is easier than that...  The stuff like DM1, DM2, CI, I believe gets blasted out globally with a BAM (even if it is a PGN like DM2 or CI that must be requested with PGN 59904 RQST).  I don't think you'll ever need RTS/CTS.

Anyway, you just hook up BAM to the CI and DTC parsers (Same BAM goes to multiple parsers).

For the "single packet" just hook up the generic PGN_Rx block.  One each to each parser.

Through in the RQST block and you can basically do this all with existing blocks.  I could probably pull together a screenshot for you if needed.

Offline Matt_Eng

  • PLUS+1 Developer
  • ***
  • Posts: 16
  • Karma: +7/-0
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #6 on: February 24, 2023, 03:00:05 PM »
Hi, there is actually an example included in the Update Center that shows a setup with a DM1, DM2, and a CI message being received.
It can be found under Files->Applications->PLUS+1 GUIDE examples->J1939_Example
When you download it, you'll find an scs file in the download directory that you can view and even copy.

The newer RTS_CTS + BAM setup is a little more confusing than just dropping in a DM1 or DM2 block, but in order to correctly support multi-packet messaging and satisfy J1939-82 compliance testing it was necessary.

Offline AlbertMilani

  • PLUS+1 Developer
  • ***
  • Posts: 11
  • Karma: +0/-0
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #7 on: March 13, 2023, 05:56:32 PM »
Hi,

I got it working using the example (PLUS+1 GUIDE examples->J1939_Example) that Matt_eng recommended! It wasn't too bad after all.

Sorry, I took so long to get back to this; I had some more urgent things to fix.

Thanks!
Albert

Offline macbahi

  • PLUS+1 Expert
  • ****
  • Posts: 88
  • Karma: +1/-0
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #8 on: March 14, 2023, 02:02:04 PM »
Hi!

I am interesting to see J1939 example but I didn't find it in my update center.

Please you can see my image of my Plus+1 Update center.

Thank you very much

With best regards


Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 159
  • Karma: +27/-1
Re: J1939 Receiving Large Message (EC, FEE3)
« Reply #9 on: March 15, 2023, 09:27:51 AM »
Mine looks like the attached image. Update Centre version is 1.0.155.4923