Trace Configuration to Analyze CCP/XCP Communication 2014-03-12 SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf Author(s) Restrictions Marx, Alexander Table of contents 1 Overview... 1 2 Configuration of the Trace Window... 1 3 Export of the Trace Information... 3 3.1 Insert Protocol Information Into a Text File... 3 3.2 Write a Text File Automatically... 4 4 Application Example... 5 4.1 Preconditions... 5 4.2 Working Instruction... 6 4.3 Summary... 8 5 Contacts... 10 1 Overview This Support Note describes how to configure the trace window to analyse CCP or XCP communication in CANape. 2 Configuration of the Trace Window To open a Trace window click Display Trace window in the menu bar. Figure 1: Opening of the Trace Window You have to select a device to see the protocol information in the Trace window. SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 1
Figure 2: Select the Device in the Device List of the Trace Window Some settings in the trace configuration should be set to become a whole trace: Figure 3: Trace Configuration Dialog, Page Extended 1. For the buffer the number of entries can be in a range between 10000 and 100000. 2. The general options "Delete content at measurement start" and "Trace only when measurement is running" should be unselected to display also the CONNECT sequence and the DAQ list configuration in the Trace window. 3. Additionally to the trace buffer it is possible to write a log file to save also a huge number of CCP or XCP messages. SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 2
3 Export of the Trace Information Information from the Trace window can be exported into a text document by copy and paste. Since CANape version 6.5 a log file can also be saved automatically from the Trace window. 3.1 Insert Protocol Information Into a Text File The content of the Trace window can be exported by the option Copy as Text in the context menu of the Trace window. After this you can open a text document and insert the protocol information with paste. Figure 4: Copy Content of the Trace Log to Clipboard In this case only the selected commands will be copied. With the Select All option in the context menu of the Trace window the whole content can be copied. Figure 5: Copy Content of Trace Log from Clipboard into a Text File SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 3
3.2 Write a Text File Automatically With the option "Write log file" in the trace configuration it is possible to generate a trace log automatically. Figure 6: Trace Configuration Dialog, Page Extended The path and the file name can also be configured like the behavior of overwriting or extending an existing log file. When several devices or calibration processes are traced it can be that the messages are not traced in the correct order by time. But the logged strings in the log file cannot be sorted of course. If the log file should be sorted by time it is recommended to open and sort it in Excel. Make sure that the general options "Delete content at measurement start" and "Trace only when measurement is running" are deactivated. Only in doing so, the entire trace log is displayed from the connection setup to a stop command. SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 4
4 Application Example The following short application example will show a way to analyze the communication between CANape and an ECU with a CCP or XCP protocol command. 4.1 Preconditions Please reduce the count of the signals in the measurement list to one or two signals. This is enough to check the functionality in general. Figure 7: Reduction of Amount of Signals in the Measurement Configuration The initial state in CANape should be the offline mode. The current state is displayed in the main window of CANape. Figure 8: Verification of the OFFLINE Status of CANape If the current state is ONLINE, please disconnect the device by the symbol in the toolbar or (with a double click) in the Device window. SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 5
Figure 9: Going ONLINE in CANape Finally, please empty the Trace window by the option Clear All in the context menu or via the symbol in the toolbar of the Trace window. Figure 10: Delete Existing Messages in the Trace Window 4.2 Working Instruction First of all please change the current state of the device to ONLINE. You can do this for example by the online symbol in the toolbar or (with a double click) in the Device window. Figure 11: Go ONLINE in CANape SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 6
It is important that the information in the Trace window is starting with the command CONNECT. If you save the information into a text file, make sure that the first protocol command will also be the CONNECT command. Figure 12: Connection Establishment Shown by the Command CONNECT After the CONNECT command every device can have different protocol commands in the Trace window. This depends on the different driver settings of the device, the protocol type and some other things. The second step is to start the measurement. You can do this by the symbol in the toolbar: Figure 13: Start Measurement Before the measurement starts, some other protocol commands could be sent like the DAQ list configuration. Figure 14: Display of the DAQ List Configuration Before Measurement Results SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 7
Last of all, please stop the measurement by the symbol in the toolbar: Figure 15: Stop Measurement 4.3 Summary Please check if all protocol commands are available in the Trace window. Starting with the protocol command CONNECT Figure 16: Command CONNECT until the protocol command START_STOP_SYNCH, START_STOP_ALL or START_STOP. Figure 17: Command START_STOP_SYNCH The content of the Trace window can be exported by the context menu options Select All and Copy as Text. After this you can open a text document and insert the protocol information with paste. Figure 18: Copy Content of the Trace Window SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 8
If you have saved the protocol commands into the text file, please check if the text file begins with the protocol command CONNECT and ends with one of the START_STOP_* commands. Figure 19: Checking the Completeness of the Trace Log SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 9
5 Contacts Please find the contacts of Vector Informatik GmbH and all subsidiaries worldwide via: http://www.vector.com/vi_addresses_en.html SN-IMC-1-002_Trace_Analysing_CCP_XCP_en.pdf 10