Author Topic: Transmit a J1939 data : PGN65128 SPN1638 (HydTemp)  (Read 9976 times)

Offline spittet

  • PLUS+1 Guru
  • *****
  • Posts: 118
  • Karma: +6/-1
Transmit a J1939 data : PGN65128 SPN1638 (HydTemp)
« on: May 31, 2013, 10:45:41 PM »
Hi,

I want to broadcast an information using J1939 protocol. I have an hydraulic temp sensor connected to one of the inputs of a MC050. I want to transmit this info in J1939. The device that want this info is waiting for data of PGN65128 and SPN1638.

I saw that there is a block in the J1939 Function Block named VF_Rx that is used to receive the same data. But I didn't found the one to transmit this data. Is there a generic J1939 transmitter block that I can simply input the data, the PGN, the SPN, the CAN port and the source address.

Let me know!

Sam

Offline spittet

  • PLUS+1 Guru
  • *****
  • Posts: 118
  • Karma: +6/-1
Re: Transmit a J1939 data : PGN65128 SPN1638 (HydTemp)
« Reply #1 on: June 03, 2013, 10:18:15 PM »
After some search, I was able to do it. For future reference, here is how I did it :

-Use a "Transmit CAN" block.
-Set the "EXT" at true.
-Set the "RTR" at false.
-Set the length at 8.
-Create an array of 8 U8 bytes.
-Fill the byte0 with the hydraulic temp (from 0-250, 1°C = 1 step, -40°C offset)
-Fill all the other bytes with 255.
-use the following ID : 0x0CFE6803 (FE68 is the PGN 65128, 03 is the address of my MC050 ECU, 0C is the priority)

Voila!

Done!

I hope this will help people in the future!

Sam

Offline Neil

  • PLUS+1 Expert
  • ****
  • Posts: 96
  • Karma: +2/-0
Re: Transmit a J1939 data : PGN65128 SPN1638 (HydTemp)
« Reply #2 on: June 03, 2013, 11:07:49 PM »
Great work Sam.

thank you for the info.

regards Neil.