Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing A2L file

Is there any way to Parse a A2L file, so that we can extract all the readable and writtable parameters in 2 different arrays.

 

Thank you

- Raghu

 

 

0 Kudos
Message 1 of 10
(15,670 Views)

Hi Raghu123,

 

If you know the file format you can certainly load that file and parse it however you wish.  I would invite you to examine our ECU Measurement and Calibration Toolkit a little closer to see if this will do what you need it to.  Here is a link to the manual for this toolkit that has details on the functions that come with it and how to use them. Please post back if you have questions!

 

Regards,

Dustin D

Message 2 of 10
(15,655 Views)

Dustin,

 

Do you know if a particular A2L file (and controller implementation) must support either CCP or XCP in order to be readable by the M&C toolkit? 

 

I've got the toolkit, and can see that the formatting of the individual variable records for characteristics and measurement values are identical to the entries contained in the sample A2L files from the toolkit (CCPECU.a2l & XCPECU.a2l), but I am unable to get the toolkit to sucessfully open and parse any one of my files. 

0 Kudos
Message 3 of 10
(15,652 Views)

Hi Sporty,


Per the manual:

 

 


 

The ECU M&C Toolkit is particularly suited to the automotive industry and
their component suppliers. It provides a function set that can be used in the
development or verification phase of an ECU. Access to the data inside an
ECU takes place based on information stored in an ASAM MCD 2MC
(*.A2L) database file provided by the ECU supplier. Selecting each signal
by its name provides convenient access to the data inside an ECU. The ECU
M&C Toolkit uses CCP and XCP as the fundamental communication
protocols and to support ECU database (*.A2L) files. You can easily switch
between the CCP and XCP protocol layers through software.



The M&C Toolkit only supports CCP and XCP communcations.

 

Post back if you have more questions!

 

Regards,

Dustin D

0 Kudos
Message 4 of 10
(15,648 Views)

Hi sporty,

 

It is possible that the toolkit fails to load your A2L.  The following KB explains some steps you can take to look into the issue.

 

If the information in the knowledgebase does not help you resolve the problem, please contact canpse@ni.com.  As explained in the KB, please keep in mind that this may require you to send your .A2L file to National Instruments.  We understand that .A2L files are highly confidential, but it is extremely difficult for us to help without having the file in these cases.

 

Thanks,

O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 5 of 10
(15,642 Views)

Thanxs for the reply.. I had installed the trial version of ECU Measurement and Calibration Tool kit and used the M-C explorer.vi. I was able to parse the file.

0 Kudos
Message 6 of 10
(15,637 Views)

@O_Proulx wrote:

 

It is possible that the toolkit fails to load your A2L.  The following KB explains some steps you can take to look into the issue.

 

If the information in the knowledgebase does not help you resolve the problem, please contact canpse@ni.com.  As explained in the KB, please keep in mind that this may require you to send your .A2L file to National Instruments.  We understand that .A2L files are highly confidential, but it is extremely difficult for us to help without having the file in these cases.

 

Thanks,


 

Thanks for the response.  We went through all of that, and the issue ended up being that we don't support either CCP or XCP in our controller implementation.  In the end, I just spent a day or so writing a simplifed parser to pick the relevant parts out of the A2L file and it worked very well. 

0 Kudos
Message 7 of 10
(15,630 Views)

HOW to generate a2l file by labview.CAN you solve my problem.I appreciate your answer.

 

0 Kudos
Message 8 of 10
(6,643 Views)

8 Years. Also unrelated question, make a new thread.  That being said the answer is going to be to write the text file using File I/O operations unless there is some already made library to do it for you.

0 Kudos
Message 9 of 10
(6,630 Views)

 

 

0 Kudos
Message 10 of 10
(6,625 Views)