PLUS+1 Software > Displays

Displaying a descriptionj string based on SPN/FMI error code

(1/2) > >>

spittet:
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

pinias:
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

pinias:
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

Marbek_Elektronik:
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?

AlbertMilani:
@pinias
Could you elaborate on your MODULE?

@Anybody
1. Does anyone know of a MODULE tutorial?  Are they like POUs?
2. I was thinking of making a c file that has my database as an initializer to a structure, and then accessing it through a C POU.
 The table would be something like this:

--- Code: ---struct dtc_list
{
   unsigned int dtc;
   unsigned int fmi;
   unsigned int pcode;
   char *desc;
};

dtc_list[] =
{
    { 1234, 3, 202, "Peu36 Space modulator voltage high" },
    { 222, 1, 123, "Intake air pressure sensor voltage high" },
...
};
--- End code ---

Albert
   

Navigation

[0] Message Index

[#] Next page

Go to full version