Author Topic: PGN 65259 SPN 588  (Read 15974 times)

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 125
  • Karma: +1/-0
PGN 65259 SPN 588
« on: May 17, 2022, 02:42:31 PM »
Hi!

I want to use PGN 65259 SPN 588 in order to get engine serial number but I didn't find this function in Danfoss library.

So I must to do any alternative to get it.

I didn't understand:   stat byte = c and length =200 byte  .  Please see the file included.

Please anyone have any ideas what might be the issue?

I will appreciate your collaboration if you have a similar code to share.

Thanks in advance for your help

With best regards

Offline Matt_Eng

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +10/-0
Re: PGN 65259 SPN 588
« Reply #1 on: May 17, 2022, 05:31:58 PM »
Hi Macbahi,

PGN 65259 is a multipacket message with variable length.

This PGN is available under Bidirectional->TransProtocol_Rx->Parsers, and it is called CI_Parser

To receive and process the message, you'll need three blocks.
1. Req_PGN_Tx: This will be used to request PGN 65259 from the remote device
2. TP_RTS_CTS_Rx: This is used to receive the multipacket messages. It needs to be configured to receive PGN 65259
3. CI_Parser: This block is connected to TP_RTS_CTS_Rx and decodes the message into a nice friendly signal.

There is a small J1939 Example in the update center that shows the CI_Parser, but it is missing the Req_Pgn_Tx function which is needed.

-Matt_Eng

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 125
  • Karma: +1/-0
Re: PGN 65259 SPN 588
« Reply #2 on: May 17, 2022, 07:53:33 PM »
Hello sir,

Thank you very much to answer me.

but I don't know where I find Bidirectional->TransProtocol_Rx->Parsers, and it is called CI_Parser

Thanks
With regards

Offline Matt_Eng

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +10/-0
Re: PGN 65259 SPN 588
« Reply #3 on: May 17, 2022, 10:29:54 PM »
They are slightly newer functions, but they are available in version 5.10 of the J1939 Library.
I've attached a small screenshot of the library tab and have added red boxes to highlight the 3 functions I mentioned.

I've also added a little picture example of how the 3 blocks work together.

-Matt_Eng

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 125
  • Karma: +1/-0
Re: PGN 65259 SPN 588
« Reply #4 on: May 18, 2022, 03:08:14 PM »
Hi sir Matt,

Thank you very much.

I updated my J1939 library 400 for 510.  I found all.

Thanks for your help

Yours sincerely

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 125
  • Karma: +1/-0
Re: PGN 65259 SPN 588
« Reply #5 on: August 30, 2022, 02:43:02 PM »
Hi All,

I am using PGN 65259 in order to get motor serial number as you see in Matt_Eng example.

As result usually a serial number_size = -1;

Please could you tell me where is the problem

Thanks for your help

With best regards

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 201
  • Karma: +37/-1
Re: PGN 65259 SPN 588
« Reply #6 on: August 31, 2022, 09:15:41 AM »
Is the Source and Destination mixed up for TP_RTS_CTS_Rx1?. I think Source should be the device you are receiving from and Destination is the Local address.

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 125
  • Karma: +1/-0
Re: PGN 65259 SPN 588
« Reply #7 on: August 31, 2022, 09:51:42 PM »
Hi Acmall,

You are right, it's working now.
I get 2 data: motor serial number size and motor serial number

motor serial number size = 8
motor serial number[1]= 55;
motor serial number[2]= 29;
motor serial number[3]= 41;
......
motor serial number[8]= ;

Is't that  motor serial number 552941........

Thank you very much
with best regards

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 201
  • Karma: +37/-1
Re: PGN 65259 SPN 588
« Reply #8 on: September 01, 2022, 09:09:41 AM »
I have not used it so you will need to confirm this but, I would have expected the CI_Parser to return an array of ASCII codes. What you are getting back doesn't appear to be a serial number when converted.

55 = 7
29 = [GROUP SEPERATOR]
41 = )

What make of engine are you getting the serial number from? In your code PGN 65259 is being requested from Node ID 3. Per J1939 ID 3 is normally Transmission #1, 0 is Engine #1 & 1 is Engine #2.

Offline Matt_Eng

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +10/-0
Re: PGN 65259 SPN 588
« Reply #9 on: September 01, 2022, 08:20:10 PM »
I agree the result does seem a little strange. However, it should be possible to convert the ascii array to a string to make it easier to read.
Should just be a Retype to String, and then the checkpoint can be read in the service tool with a "String Parameter" in an advanced page.

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 125
  • Karma: +1/-0
Re: PGN 65259 SPN 588
« Reply #10 on: September 15, 2022, 11:08:27 PM »
Hi All

Sorry I was busy.

In the end It's working now but I can not see in display because string
  • did not exist.


In service tools it's working as you see in pictures:

Danfoss_MotorSerialNumber.png       I used directly the variable  SerialNumber[1], 2,3, 4  etc.   it's working.

Danfoss_MotorSerialNumber_String.png    I used retype with string
  • ,   It's working too. see Danfoss_MotorSerialNumber_String_plus1.png


But my problem is how can I see SerialNumber[8] in my display. 
In edit text type:  the string[?] didn't exist as you see in picture Danfoss_MotorSerialNumber_String_Display.png

I hope you understand my problem.

Thanks in advance for your help.

With best regards

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 201
  • Karma: +37/-1
Re: PGN 65259 SPN 588
« Reply #11 on: September 16, 2022, 09:21:26 AM »
Change the RETYPE to STRING instead of STRING[8].

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 125
  • Karma: +1/-0
Re: PGN 65259 SPN 588
« Reply #12 on: September 16, 2022, 03:30:31 PM »
Hi acmall.

It's done. Thank you very much sir

with bests regards