Author Topic: Displaying a descriptionj string based on SPN/FMI error code  (Read 941 times)

Offline spittet

  • PLUS+1 Guru
  • *****
  • Posts: 113
  • Karma: +5/-1
Displaying a descriptionj string based on SPN/FMI error code
« on: October 06, 2020, 04:16:41 AM »
Hi,

My customer would like the "Error Description" to be displayed next to the "Error Code" when a SPN/FMI J1939 diagnostic code is displayed on the display screen.

I'm using the "DM1_Rx" function block to retrieve the SPN/FMI codes and it is really easy to display the SPN/FMI codes and go through all the active codes.

I'm also using the "Fault Manager Library" to create my own machine related SPN/FMI code. I can display/go through them in the same manner as the DM1_Rx function block qui easily.

Now, how could I display an error description based on a specific SPN/FMI code?

I know I could do it using the a String type variables with boolean switches and hard-coded String constants, but this would not be fun to do for the 1000s of SPN/FMI codes that exists in J1939 standard. I think a database would be require to be efficient. Let say that I would have access to a such a database (Excel file???) where a column would contains the wanted String, how could I use this data in GUIDE?

Is it feasible? Did you ever do something similar? Any help would be appreciated.

Have a good day!

Sam

Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 194
  • Karma: +4/-0
Re: Displaying a descriptionj string based on SPN/FMI error code
« Reply #1 on: October 06, 2020, 06:02:16 PM »
Hey Spittet
I have done something similar, but I did create my database, I do not see any application where you will require all the J1939 possible SPN, but I could be wrong.

So my advise is use a MODULE for the database, it works better since the DTC is not always present.

The data base I did is for common stationary engines where you do not have a transmission J1939 enabled or additional modules like in a tractor.

But could give you an idea about how to do it

I hope it helps

Regards


if this works it means it does not let me upload pictures, I was attaching some screen shots

Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 194
  • Karma: +4/-0
Re: Displaying a descriptionj string based on SPN/FMI error code
« Reply #2 on: October 06, 2020, 06:05:51 PM »
mm something odd is happening when trying to upload pictures it just does not work, however the systems tells me it is already replied..

I do not see my 1st reply to this message so just in case

Hey Spittet
I have done something similar, but I did create my database, I do not see any application where you will require all the J1939 possible SPN, but I could be wrong.

So my advise is use a MODULE for the database, it works better since the DTC is not always present.

The data base I did is for common stationary engines where you do not have a transmission J1939 enabled or additional modules like in a tractor.

But could give you an idea about how to do it

I hope it helps

Regards

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 315
  • Karma: +7/-0
    • Marbek Elektronik
Re: Displaying a descriptionj string based on SPN/FMI error code
« Reply #3 on: October 12, 2020, 01:00:02 PM »
Perhaps by using text-arrays?
I use them for print out text to a RS232 plotter in 16 languages. One text line is one array.
I have an excel sheet and I copy the constants in the array txt-file.

Or using pictures? With text?
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung