Author Topic: Read a J1939 device without a block  (Read 14093 times)

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Read a J1939 device without a block
« on: December 29, 2015, 09:25:53 PM »
I have been trying for about a week now to read an angular sensor that is using PGN 61459. On CanKing I can see the device change when I move it so I know it is sending out data. I cannot get the MC050-018 to actually read the data. I have seen a couple examples here
http://www.plus1forum.danfoss.com/index.php?topic=660.msg1863#msg1863

and here
http://www.plus1forum.danfoss.com/index.php?topic=441.msg1176#msg1176

But something isn't working right.

This guy is transmitting to a J1939 block
http://www.plus1forum.danfoss.com/index.php?topic=514.msg1406#msg1406

so I used his info for what info goes into which location but still nothing happens. For now I am just trying to get some sort of value to show up either on my display or in the service tool.

Does anyone see what is wrong in my snippet or what I am missing to comunicate? I have SPN numbers but I have no idea what these are or what they're for.

Any help would be greatly appreciated!


Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 220
  • Karma: +7/-0
Re: Read a J1939 device without a block
« Reply #1 on: December 29, 2015, 11:04:53 PM »
Mikea12,

I think it should be 0X0CF013XX to recieve the message

now, the file attached explains what is what for each byte..

I hope no issues due to copyright, I am just sharing the PGN61459 and the description of each SNP

Hope it helps, some text is not at all clear but you should understand that it is a 2500 pages book!!!!

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: Read a J1939 device without a block
« Reply #2 on: December 30, 2015, 01:59:47 AM »
I think the easiest way to check if it's your CAN ID is to change CANKing to display the CAN ID of messages rather than having it display in J1939 protocol format.  That way you can easily see what the complete CAN ID is, but don't forget to make sure there are no decimal vs. hexadecimal conversion issues.

As far as manually constructing the CAN ID for a J1939 message there are some nice documents out there that show the complete 29-bit CAN ID break down for a J1939 message.  Here it is though in decimal:

- Take message priority and bit shift it over 26 places to the left (search online for a bit shift calculator)
- Take the PGN and bit shift it over 8 places to the left
- Add those the above two together and add in the source address of the transmitting device
Result is the CAN ID in decimal form.  Convert to hexadecimal with a calculator, and that's what you put into GUIDE 0x_________

Also, you'll want to put a 'True' constant into the 'EXT' input since it's a 29-bit CAN ID.
Controls Engineer
Hydra-Power Systems

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 352
  • Karma: +8/-0
    • Marbek Elektronik
Re: Read a J1939 device without a block
« Reply #3 on: December 30, 2015, 08:50:17 AM »
217060258 -> 0CF013A2 (extended format)
Maybe it is better to delete the J1939 conversion and only show the messages in hex-format (options).
And then show us a new window with more informations.
« Last Edit: December 30, 2015, 08:52:17 AM by Marbek_Elektronik »
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Re: Read a J1939 device without a block
« Reply #4 on: December 30, 2015, 03:53:08 PM »
217060258 -> 0CF013A2 (extended format)
Maybe it is better to delete the J1939 conversion and only show the messages in hex-format (options).
And then show us a new window with more informations.

This is exactly what it ended up being. I changed from decimal to hexidecimal and right there was the extended format ID. I had changed T/F on extended a few times and didn't work didn't realize the output was set to decimal instead of hex.

Thank you so much guys! I have been pulling my hair out trying to figure this out. The machine gets tested tomorrow and I was on a real time crunch to get this going so I didn't need to use some old equipment again.

Again THANK YOU!
-Mike