PLUS+1 User Forum
PLUS+1 Software => Code sharing => Topic started by: macbahi 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
-
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
-
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
-
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
-
Hi sir Matt,
Thank you very much.
I updated my J1939 library 400 for 510. I found all.
Thanks for your help
Yours sincerely
-
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
-
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.
-
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
-
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.
-
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.
-
Hi All
Sorry I was busy.
In the end It's working now but I can not see in display because string
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
-
Change the RETYPE to STRING instead of STRING[8].
-
Hi acmall.
It's done. Thank you very much sir
with bests regards