There are 2 tools primarly from simulating the ECU network Simulation
Both tools provided by vector company
*CANoe
*CANALYZER
These tools are capable to send & recieve message from canalyzer to ECU & ECU to
canalyzer
With this capability, we can simulate both sending & recieving the message
capability from ECU's
Example:
Assume that customer complaining about speedo-meter not recieving data properly
from the main ECU
Steps for Debug:
1. Take out the ECU from the car
2. Connect the ECU to the computer where CANoe/CANanalyzer installed
3. Create the Speedo-meter node in CANoe measurement setup
4. Write a sample CAPL script to send the main ECU message
5. Verify if data is recieved properly or not
CANALYZER == Only Single node communication capability
CANoe == Multi Node communication Capability
Apart from multi node capability CANOe provides more functionalities such as
panal/Graphic/HMI creation, simulink & modelling etc
The typical hardware connection as follows
[System with installed CAnoe/CAnalyzer]
[]=======CANXLCARD===Trans'r=========[]==ECU Under Test
Example: Assume that we got one customer complaint for speedo meter not moving
properly
The we take that ECU & connect to the CANAlyzer & start the measurement make sure
that ECU sending the data
as expected
CANALYZER:
==========
The canalyzer is single node simulation tool
The 4 types of blocks can be created
1. Generator Block
2. Interactive Generator Block
3. Reply Block
4. CAPL node
Generator Block -- Oldest method of creating the node
- This is represented by 'G'
CAPL:
=====
- CAPL is script developed based on C programming
- Some of the features of C programming is derived & CAPL is developed
- CAPL scripting is primarly used for automation of test cases
1. Transmitting the messages
2. Recieving the messages
Some of the important notes on CAPL
===================================
1. Both C/C++ types of comments allowed
2. The variable naming conventions of CAPL is same as that of C
3. Only some of the keywords available in CAPL based on features supported in CAPL
Supported: Not supported:
break auto
case const
char enum
continue extern
default goto
do register
double short
else signed
float sizeof
for static
if struct
int typedef
long union
return unsigned
switch volatile
while
4. With respect to data types along with existing data types like int, float,
double & char CAPL introduces some more data type
for handling CAN message, timer etc
char==>character 8 bit unsigned
byte==>byte 8 bit unsigned
int==>integer 16 bit signed
word==>word 16 bit unsigned
long==>long integer 32 bit signed
dword==>double word 32 bit unsigned
float=>single precision floating point 64 bit1 signed
double==> single precision floating point 64 bit signed
message==> a communication message -- --
timer==>a timer with second resolution -- --
msTimer==>a timer with millisecond resolution -- --
5. All the variables must be declared in variable section of CAPL browser
6. All the local variables are of type static in nature, no auto variable or
register or extern
7. The function implementation must be done in function block CAPL browser
8. typecasting is allowed to convert one type of data to other data type
9. Intialization is alloweed
10. Array handling available to support multiple variable of same data type
11. All the arthimatic operators available
12. Increment/Decrement available
13. Shorthand operators available
14. Boolean opeators available
15. Bitwise/Relational operators available
16. *, & not avaibale because no pointer
-> not available because no structure handling
# is not available because no macro handling
17. All the control statements available like if, nested if, if-else available
18. All the loops available
19. All the branching available except goto
20. Some of the c++ features such function overloading, this pointer(To refer to
current CAN message)
21. Lot of inbuilt function available
CAN message handling specific functions available
isExtId==> Checks for extended identifier
isStdId==> Checks for standard identifier
mkExtId==> Creates extended identifier
output==> Ouputs message, pg (specific to J1939), or error frame onto the bus
valOfId==> Gets the value of a message identifier
Partial string library supported for handling strings in CAPL
atol Converts a string to a long integer
ltoa Converts a number to a string
snprintf Creates a formatted string
strlen Gets the length of a string
strncat Concatenates two strings
strncmp Compares two strings
strncpy Copies a string