Sei sulla pagina 1di 41

INDEX

1. CAN

2. CANoe TOOL

3. CAPL

4. PROJECTS

5. REAL TIME QUESTIONS


1. CAN
1. What is CAN Protocol? Explain its uses? Speed?

Ans: Definition: CAN stand for Controller Area Network. It is an automotive standard
Serial asynchronous communication bus, which supports effective distribution between
Real time controllers with high level of security. CAN protocol can be defined as the set of
rules for transmitting and receiving messages In a network of electronic devices.
Uses:
Low cost: As CAN serial bus uses two wires, it offers good price/performance ratio.
Also, driven by high volume production of low cost protocol devices, they are relatively
cheap.
Reliable: Because of excellent error detection and error handling mechanisms used
by CAN, it offers high reliability transmission. It is also highly immune to Electromagnetic
Interference
Flexibility: CAN Nodes can be easily connected / disconnected. Also, the number of
Nodes is not limited by the protocol
Good Speed: CAN support data rate of 1 MBit/s @ 40m bus length.
Multi-master communication: Any node can access the bus
Fault Confinement: Faulty nodes do not disturb the communication.
Broadcast capability: Messages can be sent to one /many/all nodes.
Standardized: ISO has standardized CAN via ISO-DIS 11898 high speed Applications)
and ISO-DIS 11519-2 (low speed applications). CAN protocol is also Standardized by
industry organizations such as SAE-Society of Automotive Engineers.
Speed:
I. Theoretically the speed of CAN is 1MBPS@ 40 meters. If the cable length Increases will
decrease the speed, due to RLC on the cable.
II. Practically the CAN speed is 512 KBPS is possible in Real Time Process.

2. Which logic CAN protocol follows?

Ans: Wired AND logic

3. Why CAN is reliable?

Ans: CAN Protocol checking the messages Transmitter side and Receiver side whether
the messages are properly transmitted or received.
(Or)
CAN Protocol itself check to see if every message transmitted was delivered at the
receiving End. If any packet loses it will send lost packets, make sure that all data
Transmitted or received.

4. Explain CAN Protocol Layers?

Ans: CAN Protocol work based on 3 layers of OSI model.


I. Physical layer
II. Data link layer
III. Application layer.

I. Physical layer: is responsible for Bit encoding, Bit decoding and Bit transmission. The
physical layer transmits bit from one device to another and regulates the transmission of
bit streams. It defines the specific voltage and the type of cable to be used for transmission
protocols. It provides the hardware means of sending and receiving data on a carrier
defining cables, cards and physical aspects
II. Data link layer: is responsible for Message transmission, reception and error handling
packages raw data into frames transferred from physical layer. This layer is responsible
for transferring frames from one device to another without errors. After sending the
frame it waits for the acknowledgement from receiving device. Data link layer has two sub
layers:
i. MAC (Medium Access Control) layer: It performs frame coding, error detection,
signaling, serialization and de-serialization.
ii. LLC (Logical Link Control) layer: The LLC sub layer provides multiplexing mechanisms
that make it possible for several Network protocols (IP, Decnet and Appletalk) to coexist
within a Multipoint network and to be transported over the same network Medium. It
performs the function of multiplexing protocols transmitted By MAC layer while
transmitting and decoding when receiving and providing node-to-node flow and error
control.
III. Application Layer: It serves as a window for users and application processes to
access network services. The common functions of the layers are resource sharing, remote
file access, network management, electronic messages and so on.
5. Explain about CAN Message Frames?

Ans: CAN Message frames: There are four different frames which can be used on the
bus.
I. Data frames- These are most commonly used frame and used when a node transmits
information to any or all other nodes in the system. Data Frames consist of fields that
provide additional information about the message as defined by the CAN specification.
Embedded in the Data Frames are Arbitration Fields, Control Fields, Data Fields, CRC
Fields, a 2-bit Acknowledge Field and an End of Frame.

i. SOF - Start of Frame bit. It indicates start of message and used to synchronize the nodes
on a bus. A dominant bit in the field marks the start of frame.
ii. IDENTIFIER - It serves dual purpose one, to determine which node has access to the
bus and second to identify the type of message.
iii. RTR - Remote Transmission Request. It identifies whether it’s a data frame or a
remote frame .RTR is dominant when it is a data frame and recessive when it is a remote
frame. IDE – Identifier Extension. It is used to specify the frame format. Dominant bit is
for standard frame and recessive for extended frame. R0 – Reversed bit. Not used
currently and kept for future use.
Iv. DATA– Used to store up to 64 data bits of application data to be transmitted.
DLC – Data Length Code. It is 4 bit data length code that contains the number of bytes
being transmitted.
v. CRC– Cyclic Redundancy Check. The 16-bit (15 bits plus delimiter) cyclic redundancy
check (CRC) contains the checksum of the preceding application data for error detection.
vi. ACK – Acknowledge (ACK) field. It compromises of the ACK slot and the ACK
delimiter. When the data is received correctly the recessive bit in ACK slot is overwritten
as dominant bit by the receiver.
Vii. EOF– End of Frame (EOF). The 7-bit field marks the end of a CAN frame (message)
and disables.
Bit - stuffing, indicates a stuffing error when dominant.
IFS - Inter Frame Space that specifies minimum number of bits separating
consecutive messages. It provides the intermission between two frames and consists of
three recessive bits known as intermission bits. This time allows nodes for internal
processing before the start of next frame.
II. Remote frames - The purpose of the remote frame is to seek permission for the
transmission of data from another node. This is similar to data frame without data field
and RTR bit is recessive. For example, the microprocessor controlling the central locking
on your car may need to know the state of the transmission gear selector from the power
train controller.
III. Error frames – If transmitting or receiving node detects an error, it will immediately
abort transmission and send error frame consisting of an error flag made up of six
dominant bits and error flag delimiter made up of eight recessive bits. The CAN controller
ensures that a node cannot tie up a bus by repeatedly transmitting error frame.

IV. Overload frame-It is similar to error frame but used for providing extra delay
between the messages. An Overload frame is generated by a node when it becomes too
busy and is not ready to receive.
6. What is the difference between Data Frame & Remote Frame?

Ans: In Remote Frame Data Field doesn’t exist. But in Data Frame Data Field is existed.
For Remote Frame: - RTR bit =1 (Recessive bit)
For Data Frame: -RTR bit=0 (Dominant)

7. Explain Arbitration Process in CAN Protocol? Example.

Ans: It is a mechanism which resolves the conflict when two or more nodes try
to send the message at the same time. In this technique whenever the bus is free any
unit can transmit a message. If two or more units starts transmitting at the same time
access to the bus is conflicted, but this problem can be solved by arbitration using
identifier. During arbitration every transmitter compares the value of transmitted bit with
bit value on the bus. If the bit value is same, the node continues to send the bits. But at any
time if transmitted bit value is different from bus value the dominant bit overwrites the
recessive bits. The arbitration field of the CAN message consists of an 11- or 29-bit
identifier and a remote transmission (RTR) bit. The identifier having lowest numerical
value has the highest priority. RTR simply distinguishes between remote frame for which
RTR is recessive and data frame for which RTR is dominant. If both data frame and remote
frame with the same identifier is initiated at the same time data frame will prevail over
remote frame. With the concept of arbitration neither information nor time is lost.
Example: If master sends 764 and Slave sends 744, and then starts from MSB, first nibble
is same, Master sends 7, slaves also sends 7 the message with more dominant bits will
gain the arbitration, lowest the message identifier higher the priority.

8. Difference between CAN Standard& CAN Extended?

Ans: Number of identifiers can be accommodated for standard frame are 2power11.
Number of identifiers for extended frame is 2power29.
IDE bit – 1 for extended frame.
IDE bit – 0 for Standard frame.
9. Can they co-exist in the same network? If yes, which one takes high priority
Explain? If not, what is the reason?

Ans: Yes, CAN Standard have highest priority. In CAN standard the IDE bit is Dominant
(0). So CAN standard has the highest priority over the CAN Extended.

10. What is Bit Stuffing? Why bit stuff happens after 5th bit; why not after or
before 4th or 6th bit?

Ans: Bit Stuffing: In data transmission and telecommunication, bit stuffing also known
uncommonly as is the insertion of non-information bits into data. Stuffed bits should not
be confused with overhead bits.
Bit Stuffing in CAN: CAN uses a Non-Return-to-Zero protocol, NRZ-5, with bit stuffing.
The idea behind bit stuffing is to provide a guaranteed edge on the signal so the receiver
can resynchronize with the transmitter before minor clock discrepancies between the two
nodes can cause a problem. With NRZ-5 the transmitter transmits at most five consecutive
bits with the same value. After five bits with the same value (zero or one), the transmitter
inserts a stuff bit with the opposite state.
Use of Bit Stuffing:
Periodic edges allow receiver to resynchronize to sender clock.
Long NRZ messages cause problems in receivers
Clock drift means that if there are no edges, receivers lose track of bits.
Periodic edges allow receiver to resynchronize to sender clock

11. What is meant by Hard Synchronization & Soft Synchronization?

Ans: Synchronization: Synchronization is timekeeping which requires the coordination


of events to operate a system in unison.
Hard synchronization: is done with a falling edge on the bus while the bus is idle, which
is interpreted as a Start of frame (SOF). It restarts the internal Bit Time Logic.
Soft synchronization: is used to lengthen or shorten a bit time while a CAN frame is
received. Hard Synchronization to be performed at every edge from recessive-to-
dominant edge during Bus Idle. Additionally, Hard Synchronization is required for each
received SOF bit. An SOF bit can be received both during Bus Idle, and also during Suspend
Transmission and at the end of Interframe Space. Any node disables Hard Synchronization
if it samples an edge from recessive to dominant or if it starts to send the dominant SOF
bit.

12. What is the difference between function and physical addressing?

Ans: Functional addressing is an addressing scheme that labels messages based upon
their operation code or content. Physical addressing is an addressing scheme that labels
messages based upon the physical address location of their source and/or
destination(s).
13. What happens if I have to send more than 8-bytes of data?

Ans: If excess of 8 Bit data occurs on the bus, the data will divide into packets and it will
sent in the form of packets. The J1939 standard has defined a method of communicating
more than 8 bytes of data by sending the data in packets as specified in the Transport
Protocol (TP). There are two types of TP, one for broadcasting the data, and the other for
sending it to a specific address.
DTC consists of 4 components – SPN, FMI, OC and CM.
A DTC is a combination of four independent fields: the
Suspect Parameter Number (SPN) of the channel or feature that can have faults; a
Failure Mode Identifier (FMI) of the specific fault; the occurrence count (OC) of the
SPN/FMI combination; and the SPN conversion method (CM) which tells the receiving
mode how to interpret the SPN. Together, the SPN, FMI, OC and CM form a number that a
diagnostic tool can use to understand the failure that is being reported.

14. What is OBDII?

Ans: On-Board Diagnostics in an automotive context is a generic term referring to a


vehicle's self-diagnostic and reporting capability.

15. Why Diagnostic Standards?

Ans: As systems got more complex the link between cause and symptom became less
obvious. This meant that electronic systems had to have some level of self-diagnosis and
to communicate to the outside world. Initially many systems used their own protocols
which meant that garages had to have a large number of tools – even to diagnose a single
vehicle.

16. Explain about UDS & KWP2000?


Ans: UDS: Unified Diagnostic Service Protocol. Event triggering and periodic transmission
are applicable only in UDS. Transfer of measurement values, only two-byte identifiers are
available in UDS.
KWP2000: Key Word Protocol. Positive response suppression for tester present is not
present in KWP2000. In KWP2000 one byte record local identifier and two byte common
identifier.

17. Can you have two transmitters using the same exact header field?

Ans: No – That would produce a bus conflict. Unless you have middleware that ensures
only one node can transmit at a time.

18. Explain CAN physical layer voltage levels?


Ans:

19. What are the functions of CAN transceiver?

Ans: The transceiver provides differential transmit capability to the bus and differential
receive capability to the CAN controller. Transceiver provides an advanced interface
between the protocol controller and the physical bus in a Controller Area Network (CAN)
node. Typically, each node in a CAN system must have a device to convert the digital
signals generated by a CAN controller to signals suitable for transmission over the bus
cabling. It provides a buffer between the CAN controller and the high-voltage spikes that
can be generated on the CAN bus by outside sources (EMI, ESD, electrical transients, etc.).

20. Explain CAN bit timing?

Ans: According to the CAN specification, the bit time is divided into four segments. The
Synchronization Segment, the Propagation Time Segment, the Phase Buffer Segment 1,
and the Phase Buffer Segment 2. Each segment consists of a specific, programmable
number of time quanta (see Table 1). The length of the time quantum (tq), which is the
basic time unit of the bit time, is defined by the CAN controller’s system clock fsys and the
Baud Rate Prescaler (BRP) :tq = BRP / fsys. Typical system clocks are: fsys = fosc or fsys =
fosc/2.

The Synchronization Segment Sync_Seg is that part of the bit time


where edges of the CAN bus level are expected to occur; the distance between an edge that
occurs outside of Sync_Seg and the Sync_Seg is called the phase error of that edge. The
Propagation Time Segment Prop_Seg is intended to compensate for the physical delay
times within the CAN network. The Phase Buffer Segments Phase_Seg1 and Phase_Seg2
surround the Sample Point. The (Re-) Synchronization Jump Width (SJW) defines how far
a resynchronization may move the Sample Point inside the limits defined by the Phase
Buffer Segments to compensate for edge phase errors.

Two types of synchronization exist: Hard Synchronization and


Resynchronization. A Hard Synchronization is done once at the start of a frame; inside a
frame only Resynchronizations occur.
Hard Synchronization After a hard synchronization, the bit time is restarted with the
end of Sync_Seg, regardless of the edge phase error. Thus hard synchronization forces the
edge which has caused the hard synchronization to lie within the synchronization
segment of the restarted bit time.
Bit Resynchronization Re-synchronization leads to a shortening or lengthening of the
bit time such that the position of the sample point is shifted with regard to the edge.

21. What happen when two CAN nodes are sending same identifier at a same time?

Ans: Two nodes on the network are not allowed to send messages with the same id. If two
nodes try to send a message with the same id at the same time arbitration will not work.
Instead, one of the transmitting nodes will detect that his message is distorted outside of
the arbitration field.

The nodes will then use the error handling of CAN, which in this case ultimately will lead
to one of the transmitting node being switched off (bus-off mode).
22. What is Bit Rate & Baud Rate? Difference? Baud Rate Formula?

Ans: Bit rate: measure the number of data bits (0′s and 1′s) transmitted in one second in
a communication channel.
Baud rate is the number of times a signal in a communications channel changes state.
Formula: The baud rate is calculated as:
Baud rate (bits per second) = 18.432 x 10^6 / BRP / (1 + TSEG1 + TSEG2)

23. Explain about ERROR Frame & OVERLOAD Frame?

Ans: Error Frame: Error Frame is transmitted by any node by detecting the error on the
bus. If error is detected it can put 6 error flags on the bus. Up to 12 error flags are possible.
After 6 dominant bits don’t put the error frame if also the error frame is detected wait for
the successful transmission of the message.
Error Counters: TEC and REC (transmit error counter and receive error counter)
When Error count is 95 ------------------Error Active
Error count is between 96 to 127------ Error Warning
Error count is between 128 to 255------ Error Passive
Error count is 256 ---------- Buss off state.
Overload frame: It is like IFS (inter frame space) to provide the delay between the 2 data
frames.

24. Explain about Errors in CAN?

Ans: Types of Errors:


Bit Error: Whenever a node transmitting the data it is also monitors the data until the
receiver receives the data. It is expected that the data to be same until the receiver
receives. For example if the node is transmitting 0(dominant) to the bus and it is detected
1(recessive) in the bus then it is bit error.
ACK Error: whenever the transmitting node doesn’t monitor the dominant bit in the ACK
slot then it is ACK error.
Stuff Error: After 5 consecutive bits the 6th bit will be invert (opposite) of the 5th bit
otherwise it will be Stuff Error. Normally the data frame will be 108 bits for standard
format and 108+18 for the extended format but the two standard and extended formats
are varied (total bits in both formats) based on number of stuff bits inserted.

The stuff bits inserted because for the error detection. After 5 consecutive bits if we are
inserting the 6th bit opposite to the 5th bit on edge is occurred the
Resynchronization is possible.

 The Resynchronization is for the error detection.


 Synchronization: It is the co-ordination of events.
 CAN is based on NRZ signaling why because the bit time is constant for the 1
successful bit level.
 In RZ signaling synchronization possible is very easy but CAN is chosen only NRZ.
 Because in CAN bit time calculation the entire bit time is constant for one bit level.

Form Error: In CAN formats the fixed formats bits are CRC Delimiter, ACK Delimiter and
EOF these are fixed format fields always recessive for the resynchronization. If any of the
bits are dominant then it is form error.
CRC Error: The result of the CRC calculation by transmitting side and receiving side is not
same then it is CRC error.

25. What is BUS-Off? What happens when bus-off occurs?

Ans: A node in bus off to come back to error active state wait for the 128 occurrences of
11 consecutive bits. OR we can reset by the software i.e., CAN reset API in the driver
development module.

26. Why CAN is Message Oriented Protocol?

Ans: CAN protocol is a message-based protocol, not an address based protocol. This
means that messages are not transmitted from one node to another node based on
addresses. Embedded in the CAN message itself is the priority and the contents of the data
being transmitted. All nodes in the system receive every message transmitted on the bus
(and will acknowledge if the message was properly received). It is up to each node in the
system to decide whether the message received should be immediately discarded or kept
to be processed.

27. What is Inter Frame Space?

Ans: IFS - Inter Frame Space that specifies minimum number of bits separating
consecutive messages. It provides the intermission between two frames and consists of
three recessive bits known as intermission bits. This time allows nodes for internal
processing before the start of next frame.

28. What is Freeze Frame Data?

Ans: Freeze frame data is a record of the engine conditions (fuel system, calculated load,
engine coolant temperature, fuel trim, engine speed, vehicle speed, etc.) when a
malfunction is detected.
When troubleshooting, it can help determine if the vehicle was
running or stopped, the engine was warmed up or not, the air-fuel ratio was LEAN or
RICH, and other data, from the time the malfunction occurred.
29. What is LIN Protocol? Explain?

Ans: The Local Interconnect Network (LIN) bus was developed to create a standard for
low-cost, low-end multiplexed communication in automotive networks. Though the
Controller Area Network (CAN) bus addresses the need for high-bandwidth, advanced
error-handling networks, the hardware and software costs of CAN implementation have
become prohibitive for lower performance devices such as power window and seat
controllers. LIN provides cost-efficient communication in applications where the
bandwidth and versatility of CAN are not required. You can implement LIN relatively
In-expensively using the standard serial universal asynchronous receiver/transmitter
(UART) embedded into most modern low-cost 8-bit microcontrollers. Modern automotive
networks use a combination of LIN for low-cost applications primarily in body electronics,
CAN for mainstream power train and body communications, and the emerging FlexRay
bus for high-speed synchronized data communications in advanced systems such as active
suspension. The LIN bus uses a master/slave approach that comprises a LIN master and
one or more LIN slaves.

The message header consists of a break used to identify the start of the frame and the sync
field used by the slave node for clock synchronization. The identifier (ID) consists of a 6-
bit message ID and a 2-bit parity field. The ID denotes a specific message address but not
the destination. Upon reception and interpretation of the ID, one slave begins the message
response, which consists of one to eight bytes of data and an 8-bit checksum.
The master controls the sequencing of message frames, which is fixed in a schedule. You
can change the schedule as needed. There are several versions of the LIN standard.
Version 1.3 finalized the byte-layer communication. Versions 2.0 and 2.1 added more
messaging specifications and services but are compatible at the byte level with LIN 1.3.
30. Difference between LIN & CAN Protocol?

Ans:
The Local Interconnect Network (LIN) protocol specification provides a low-cost,
Short-distance, and low-speed network, enabling the implementation of a new level
of electronics intelligence in automotive subsystems. LIN operates under a CAN platform,
but it doesn't require the robust data rate and bandwidth performance, or the higher cost,
associated with CAN.
 The typical automobile network is broken up into several subnet works. These
include body control, powertrain, and multimedia networks. Depending on the
speed and cost requirements, either CAN or LIN can be implemented.
 For example, a powertrain demands significant computational processing speeds.
Yet, body electronics is more typically oriented to human-interface speeds, which
lend themselves nicely to the 20-kbit/s LIN architecture. Window lifts, door locks,
seat positioning, environmental controls, wipers, etc. are all ideal benefactors of a
robust LIN implementation where wiring complexity and weight are dramatically
reduced, and reliability is significantly enhanced.
 LIN is a single-master multi-slave bus that communicates via a single wire, reducing
Wiring complexity as well as cost. Because this protocol is self-synchronizing, it
allows the slave nodes to run from a low-cost RC oscillator.
 LIN and CAN don't compete with each other, but instead complement one another.
On the one hand, CAN serve high-speed, error-sensitive needs and operates on a 5-V
differential bus. LIN, however, serves low-speed, low-bandwidth requirements on a
12-V single-wire bus.
 An interface is necessary between LIN's country roads and CAN's high-speed
Thorough fares. A bridge node might consist of a microcontroller with an integrated
LIN transceiver combined with a low-cost stand-alone CAN transceiver. This
provides the intelligence that's needed to watch both buses and interchange data.
 For instance, perhaps temperature information would be required by various
systems within the automobile. For this application, indoor and outdoor
temperature sensors may be incorporated into a car door's LIN network. The door's
master node would place the data onto the CAN bus.
 From there, additional slave LIN devices in the rear-view mirror, or a heads-up
display, might present the data to the driver, while the environmental control
system could use the data to activate the air conditioner or heater and defroster
grids.
 The CAN specification requirement for node-to-node oscillator tolerances of 1.5%
and hardware-based error handling drive node costs up to well over $2.00. But,
LIN's tolerances of 15% and the ability to implement its protocol entirely in
software are moving node costs below $2.00.
31. How many ECUs can you connect in given 40Meters CAN Cable? Is there any
distance calculation between 2 ECUs on CAN BUS?

Ans: Maximum we can connect 30 ECUs in given 40Meters length of CAN Cable. There is
no distance calculation between 2 ECUs on CAN Bus. It is cost Effective so, that is
depending on the Client and Model of the Car.

32. Baud Rate for CAN & LIN?

Ans: Baud Rate for CAN: 250 KBPS for 40Meters CAN Cable.
Baud Rate for LIN: 2.4 KBPS – 20KBPS

33.Can CAN Protocol and LIN Protocol co-exist in the same network?

Ans: Yes, we can have both CAN and LIN Protocols in the same network.

34. Why we need Diagnostics Process?

Ans: In Automotive Field/ In Cars, the network is very complex. It is very difficult to
identify a problem manually. So by using Diagnostic process we can easily identify the
problem by sending the Diagnostics Codes.

35. How can we identify a specific sensor in a CAN network?

Ans: No, We can’t identify a specific sensor in a CAN network.

36. What is bus termination resistor value for CAN? Do they vary if we put them in
each node instead of bus ends?

Ans: CAN is half duplex two wire interface. The both ends are shorted with 120ohm
resistor because to oppose the signal reflection from both ends and also to match the
impedance. Every CAN Transceiver is having internal resistance of 60 ohm. And the two
ends are shorted with 120 ohm those 2 resistors are in parallel so

((120*120)/(120+120))= 60 ohm.

According to maximum power transform theorem the Source Impedance = Load


Impedance. To minimize the reflection reference, to reduce noise. To ensure that
reflection does not cause communication failure, the transmission
line must be terminated.

37. Why we go for CAN? Why not others?

Ans: CAN Protocol has high error detection capabilities, high immunity to external noise
signals (present in industrial processes), robustness, capability to solve bus access
collisions without any retransmission requirements, distributed control and hot-swap
ability.

38. Assume that there are 10 ECU’s in network, what will happen if one ECU in
network goes to bus-off state due to error?

Ans: Nothing will happen to the network. Just the functionalities of the particular ECU will
not be work at that time until the ECU will come to Active State.

39. What is usage of identifier?

Ans: Identifier is used to identifying the Message from where it will come and to which
node it has to go. Based on the Identifier Message Priority will give during the Arbitration
Process.

40. What type of communication? Is it point to point or broadcasting?

Ans: CAN is based on the “broadcast communication mechanism”, which is based on a


message-oriented transmission protocol. It defines message contents rather than stations
and station addresses. Every message has a message identifier, which is unique within the
whole network since it defines content and also the priority of the message. This is
important when several stations compete for bus access (bus arbitration).

41. What network topology is used in car for CAN?

Ans: It is always BUS topology

42. How many frames we can accommodate in one ECU?

Ans: Depends on number of mailbox in CAN controller, if it exceeds, we can go for


multiplexing.

43. What is dominant and recessive state?

Ans: In CAN Recessive means ‘1’


Dominant means ’0’

44. What is TEC and REC? How they increment and decrement?

Ans: TEC -- Transmit error counter


REC -Receive error counter
When error flag generated on Transmitter side TEC will increase, when error flag
generated on Receiver side REC will increase. After retransmission of corrupted message
by CAN, TEC will decreased, after received properly REC will be decreased.

45. How does CAN work? What are the features of CAN?

Ans: Controller Area Network (CAN) is a multicast shared serial bus standard, originally
developed in the 1980s by Robert Bosch GmbH, for connecting electronic control units
(ECUs). CAN was specifically designed to be robust in electromagnetically noisy
environments and can utilize a differential balanced line like RS-485. It can be even more
robust against noise if twisted pair wire is used. Although initially created for automotive
purposes (as a vehicle bus), nowadays it is used in many embedded control applications
(e.g., industrial) that may be subject to noise. The messages it sends are small (8 data
bytes max) but are protected by a CRC-15 (polynomial 0x62CC) that guarantees a
Hamming bit length of 6 (so up to 5 bits in a row corrupted will be detected by any node
on the bus).

Features of CAN:
I. Multi-Master: When the bus is free, all of the units connected to it can start sending a
message (multi-masters). The unit that first started sending a message to the bus is
granted the right to send (CSMA/CR method*1). If multiple units start sending a message
at the same time, the unit that is sending a message who’s ID has the highest priority is
granted the right to send.
II. Message Transmission: In the CAN protocol, all messages are transmitted in
predetermined format. When the bus is unoccupied, all units connected to the bus can
start sending a new message. If two or more units start sending a message at the same
time, their priority is resolved by an identifier (hereafter the ID). The ID does not indicate
the destination to which a message is sent, but rather indicates the priority of messages in
which order the bus is accessed.
If two or more units start a message at the same time, contention for
the bus is arbitrated according to the ID of each message by comparing the IDs bitwise.
The unit that won the arbitration (i.e., the one that has the highest priority) can continue
to send, while the units that lost in arbitration immediately stop sending and go to a
receive operation.
III. System flexibility: The units connected to the bus have no identifying information like
an address. Therefore, when a unit is added to or removed from the bus, there is no need
to change the software, hardware, or application layer of any other unit connected to the
bus.
IV. Communication speed: Any communication speed can be set that suits the size of a
network. Within one network, all units must have the same communication speed. If any
unit with a different communication speed is connected to the network, it will generate an
error, hindering communication in the network. This does not apply to units in other
networks, however.
V. Remote data request: Data transmission from other units can be requested by sending
a “remote frame” to those units.
VI. Error detection: Error notification, and error recovery functions All units can detect
an error (error detection function). The unit that has detected an error immediately
notifies all other units of the error simultaneously (error notification function). If a unit
detects an error while sending a message, it forcibly terminates message transmission and
notifies all other units of the error. It then repeats retransmission until the message is
transmitted normally (error recovery function).
VII. Error confinement: There are two types of errors occurring in the CAN: a temporary
error where data on the bus temporarily becomes erratic due to noise from the outside or
for other reasons, and a continual error where data on the bus becomes continually erratic
due to a unit’s internal failure, driver failure, or disconnections. The CAN has a function to
discriminate between these types of errors. This function helps to lower the
communication priority of an error-prone unit in order to prevent it from hindering
communication of other normal units, and if a continual data error on the bus is occurring,
separate the unit that is the cause of the error from the bus.
VIII. Connection: The CAN bus permits multiple units to be connected at the same time.
There are no logical limits to the number of connectable units. However, the number of
units that can actually be connected to a bus is limited by the delay time and electrical load
in the bus. A greater number of units can be connected by reducing the communication
speed. Conversely, if the communication speed is increased, the number of connectable
units decreases.

46. Why SOF is always a dominant bit?

Ans: SOF: Is always dominant (low (0)), because all nodes are synchronized within this
segment only. On edge is expected to lie within this segment only. The Hard
synchronization is done in the SOF.

47. What is the major difference between CAN 2.0B and previous version?

Ans: Version 1.0 and 1.2 defined CAN with an 11-bit message identification giving a
possible 2048 message identifiers. Version 2.0 has allowed an 18-bit message ID extension
allowing for an effective 29-bit message ID. To keep new CAN devices compatible with
older implementations, the CAN 2.0 specification is defined in two parts, 2.0A and 2.0B. In
CAN 2.0A, the message format is consistent with older versions of CAN that use only an
11-bit message ID. In CAN 2.0B the 18-bit message ID extension is allowed. CAN 2.0B can
then be implemented in either the passive or active mode. CAN version 1.0, 1.2 and 2.0A
are called “standard CAN” because they all use an 11-bit message ID. CAN 2.0 B is called
“Extended CAN” as it uses the extended 29-bit message ID.
48. What is DLC? Why is it needed?

Ans: DLC means Data Length Code. By using DLC, we can identify the Length of the data in
the Message. We can control the Data Length in the Message. For short messages we can
reduce the DLC and for large message we can set maximum value.

49. How to change the baud rate in CANoe without changing the code?

Ans: The bit rate may be changed by either changing the oscillator frequency, which is
usually restricted by the processor requirements, or by specifying the length of the bit
segments in “time quantum” and the pre-scalar value.
 In Canoe tool, we can change the bus timing register 0 & 1 values for correcting the
baud rate.
 In Autosar, we can use post build configuration for CAN Baud rate values.

50. If there is only one node on the bus and it is transmitting messages on the bus
Continuously, what will happen? Is node will go into the bus-off state or what
Happens?

Ans: If there is no other node on the bus to receive data from first node, then the REC
(Receive Error Count) will increase and finally Bus-Off condition will occurs until any
other node will appear on the bus to receive transmitted message.
2. CANoe
1. What is the difference between CANoe & CANalyzer?
Ans:
CANoe can control Multiple ECUs at a time. CANoe supports GUI (Graphical User
interface).
CANalyzer can control a single ECU. CANalyzer doesn’t support GUI.

2. What is the difference between G-Block & IG-Block?


Ans:
 There are two limitations to the Generator block that limit its effectiveness in
complex tasks. The block is misleading for some people because it requires multiple
windows for setting up the transmit message list. The second problem is the block
settings have to be set before the CANalyzer measurement starts. No changes can be
made if the measurement is running.
 Fortunately, CANalyzer has another transmission block that eliminates both
practical limitations: the Interactive Generator block (IG). The IG block combines
the configuration windows of the Generator block into one window; therefore, everything
can be setup in one spot. In addition, changes can be made with the IG.
 Without CAPL, can we simulate the other ECU’s CAN Messages except Test ECU in
the CAN Simulation Network in CANoe tool without using IG or G blocks.

3. How many CAN database can we add to the CANoe Tool?

Ans: We can add multiple number of Data Base files that is depends on the project and
number of nodes.

4. What is the use Panel Window?

Ans: By using panel window, we can create graphic panel same as real time equipment in
simulation software.

5. What are the different windows in CANoe Tool? Explain

Ans: There are different windows in CANoe tool. Those are:


I. Measurement Setup: The data flow is graphically represented and configured in the
Measurement Setup.
II. Trace window: Bus activities − such as the sending of messages or Error Frames are
listed in the Trace window. Individual signal values may be displayed for each message.
Functions such as those listed below are available for analyzing the data:
III. Graphics Window: The Graphics window is used to graphically display the values of
signals, environment data and diagnostic parameters as curves. Listed below are some of
the functions available for measurement and evaluation of these curves.
IV. Scope Window: The Scope window graphically depicts bus level measurements and is
used for the analysis of protocol errors (see also Option SCOPE, Chapter 11).
V. Data Window: The Data window is used to display the values of signals, system variables
and diagnostic parameters in different types of representation.
VII. Write Window: The Write window displays system messages and user-specific outputs
from CAPL programs.
VIII. State Tracker: The State Tracker can be used to analyze states, state transitions and
signals as well as to visualize time dependencies. The State Tracker is especially well-
suited to displaying digital inputs and outputs as well as status information such as
terminals status or network management states.
IX. Logging/Replay: Data can be logged in CANoe and replayed later in a post-
measurement analysis.
 Replay: The Replay block can be used to replay measurement sequences that have
been logged in a logging file. The messages contained in the logging file are
introduced into the data flow.
 Logging: The Logging block can log the bus traffic in the BLF and ASCII formats. The
logged data can then be replayed in offline mode or with a Replay block.

6. How you generate the Reports using CANoe Tool?

Ans: Steps to generate reports in CANoe Tool:


 Go to View in Menu Bar.
 Select Test Setup Tab and in that go to Test Environment for Test Modules.
 Then Test Module window will appear. In that select open test module.
 Start the simulation process and in the test module window click on the play
symbol.
 Then test cases will execute and XML report will ready to download.
 Then the report tab will highlight. The Click on the Report tab. It will convert XML
 File to HTML by using XSLT software which is already existed in CANoe tool.
 Finally the HTML report will be downloaded and open in any Browser.

7. How you can get Logging File? How you verify the Logging File?

Ans: Steps to get Logging File:


 Go to View in Menu Bar.
 Select Measurement Setup tab. It will open Measurement setup window.
 In that window, active the Logging Block and set the destination to Logging file to
save. Start the simulation process and finally save the Logging File.
 Logging file will save the CAN Signals and Environment Variables for future
verification.
 To verify the Logging File, set the measurement setup in offline mode and add the
 Saved logging file to OL block and start the simulation process.

8. What is XSLT? What is its use?

Ans: XSLT stands for extensible Style sheet Language Transformations. It is a language
used to convert XML documents to XHTML.

9. What is Harness?

Ans: Harness: The electrical/communication cables that are used to connect simulation
software to real time ECUs or Equipment.

10. How you connect CANoe tool to real time ECU?

Ans: By using CAN Card XL or CAN Case XL we can connect CANoe tool to real time ECUs.

11. Can you send signals in CANoe tool without having database?

Ans: Yes, we can send signals in CANoe tool without having database. By using system
variables, we send signals. And by using IG-Block/G-Block we can send Error Frame
signals. By using CAPL Scripting we can create message/signals and we can send those
signals.

12. How you calculate CAN bus load in CANoe?

Ans: CAN Bus Load: "Normal" bus load should not be > 30%.
You can goto >70% - but you need network management to control stuff for you.
Read the CAN2.A/B spec - it tells you all about how many bits go to make up a CAN frame
(remember to include bit stuffing rule..) From this you will be able to calculate bus-load.
Basically - a 500K CAN bus using 8 data bytes + std ID's will run @ 100% bus load when
there are about 9000 messages per second on the bus.
 In CANoe Tool, by using the BUS Statics Window we can observe the CAN Bus Load.
 For High Bus-Load applications the Network Management will manage the
nodes/traffic flow and only allow traffic on the CAN bus if the node the CAN
message is for is awake and on-bus.
 You can think of CAN network management as really an extension of the various
distributed functionality you have implemented across the nodes. Basically there is
no point is sending CAN traffic if the traffic will have no impact on the distributed
function, or if the function is not running...

13. Why CANoe? Mention the few uses of the CANoe tool?
Ans: CANoe Tool for design and development of distributed systems.

I. CANoe is a distributed-system design tool that extends the boundaries of network


development to include complex application behavior. CANoe supports node and system
development, as well as node emulation and physical interconnection to real modules. It is
capable of real-time execution. CANoe includes a node front panel design tool to define a
user interface, plus an integrated database to define network data variables, network
nodes, messages, and application data variables. Distributed product development, system
level testing, incremental integration, evaluation of design alternatives, module emulation,
and module testing are all simple to accomplish using CANoe. CANoe is used by system
designers, system integrators, developers of networks and ECUs, and for testing purposes
in all phases of the development process. CANoe can be used with MATLAB and Simulink
both online and offline. In online mode, you can build a Windows DLL with Simulink,
Simulink Coder, and the CANoe Target. You can use this DLL as an ECU model in CANoe to
simulate the rest of the bus behavior. Offline, you can run the simulation in MATLAB and
Simulink while CANoe provides the communication of the CAN bus.
Highlights:
 Run your simulation in MATLAB® and Simulink®, incorporating CANoe models and
CAN connectivity.
 Run your simulation in CANoe, incorporating models generated from Simulink.
 Test your application in the CAN environment.
 Simulate complex ECUs for CANoe simulations.
 Model complex applications for ECUs.
 Reuse application models after testing

14. Why CAPL scripting is used in CANoe tool?

Ans: The CAPL (Communication Access Programming Language) programming language


extends the functional scope of CANoe tremendously. Special characteristics of CAPL
include:
 Can be learned quickly since it is based on the C programming language.
 Fully event-controlled in its operation. CANoe assumes control.
 Supports symbolic access to all database information such as messages and signals.
Signal values can be used directly in their physical form. The language has been
extended with special functions for quick implementation of problem solutions in
various use scenarios (simulation, testing, diagnostics and analysis of various bus
systems).
 Flexible extension by external libraries.

15. What is flow control frame?

Ans: Flow Control is a technique so that transmitter and receiver with different speed
characteristics can communicate with each other. Flow control ensures that a transmitting
station, such as a server with higher processing capability, does not overwhelm a
receiving station, such as a desktop system, with lesser processing capability. This is
where there is an orderly flow of transmitted data between the source and the
destination. Flow Control is one important design issue for the Data Link Layer that
controls the flow of data between sender and receiver. In Communication, there is
communication medium between sender and receiver.
3. CAPL
1. CAPL stands for? / CAPL Full Form? Uses of CAPL in CANoe?

Ans: CAPL stands for Communication Access Programming Language.


Uses:
 To write Node Behavior to the Nodes/ECUs.
 To write Test Cases for the Test Procedure.
 To Access the Nodes and Graphic Panel in CANoe Tool.
 Analyze specific messages or specific data.
 Analyze data traffic.

2. What is the difference between output () &write () functions?

Ans: output () is used to send the value of message on to the CAN bus.
Write () is used to print the value in the write window which we given in the
function.

3. What are the different functions in CAPL? Explain?

Ans: There are several functions in the CAPL. Few of them are given here. They are:

Beep: To give the Beep sound


Syntax: void sound ()
{
beep (400,0); // beep (int Freq, int duration);
}

callAllOnEnvVar: To call all environment variables


Syntax: on start
{
callAllOnEnvVar();
}

 settimer (), canceltimer (), timeNow ().


 Canoffline(flag); canonline(flag); setchanel()
 Getvalue(), getvaluesize(), import()
 putValue(), getvalue(), output(), write().

Note: - Here I mentioned only few important functions only.


4. What are the different events in CAPL? Explain?

Ans: CAPL is a event based programming language. It has different types of functions.
They are:
i. On start
ii. On message
iii. On envVar
iv. On Error frame
v. On Timer
vi. On stop
vii. On key
viii. On sysVar
ix. On signal
x. On busoff
xi. On errorPassinv, on errorActive

Note: These are the different events in the CAPL.


Here I am giving few examples only.
Example:

I. on message *
{
output(this);
}

II. msTimer myTimer;


message 100 msg;
...
on key 'a' {
setTimer(myTimer,20);
}
...
on timer myTimer {
output(msg);
}

III. on errorFrame
{
switch (this.ecc & 0x20)
{
case (0x20): // in case of reception error
write ("%d Ch %d RxErr", this.time, this.can);
return;
case (0): // in case of transmission error
write ("%d Ch %d TxErr", this.time, this.can);
return;
}
}

5. How can you reset the CAN bus and specific CAN Chanel using CAPL?

Ans: If busoff condition occurs, by using resetcan function we can reset the CAN bus.

Syntax: on busoff
{
resetCAN();
}

By using resetcanex function, we can reset specific Chanel in CAN bus.

Syntax: on key ‘r’


{
resetCanEx(1); // rests the CAN chanel 1 on key pressing r.
}

6. What is the use of Environment Variables?

Ans: Environment Variables are used for communication between CAPL programming to
the CANoe Graphic Panel. It will take values from the program to graphic panel.

7. Write a sample CAPL Program for ‘sending a periodic message’ and ‘sending a
conditional periodic message’.

Ans:
 Periodic Sending Message:
variables
{
message 0x555 msg1 = {dlc=1};
mstimer timer1; // define timer1
}
on start
{
setTimer(timer1,100); // initialize timer to 100 msec
}
on timer timer1
{
setTimer(timer1,100); // reset timer
msg1.byte(0)=msg1.byte(0)+1; // change the data
output(msg1); // output message
}

Conditional Periodic Sending Message:

variables
{
message 0x400 msgA = {dlc=1};
mstimer timerA;
int conditionA = 0; // initialize conditionA = off
}
on key 'a'
{
conditionA =! conditionA; // toggle conditionA
if(conditionA == 1) // if condition is active
{
timerA,200); // then start timer
}
}
on timer timerA
{
if(conditionA == 1) // if condition is still true
{
setTimer(timerA,200); // then continue timer
}
msgA.byte(0)=msgA.byte(0)-1; // change the data
output(msgA); // output message
}

8. Explain ‘this’ Keyword in CAPL?

Ans: The keyword this is only used on a number of CAPL event procedures. The keyword
this acts like a pointer, and essentially points at data related to the current event where
the keyword is used. Table 30 shows the CAPL event procedures which use the keyword
this and how they are used.

Example: on message * // for all messages


{
// printwrite(“The message received is %c”, this.id);
}
9. Explain about ‘Enum’ in CAPL?

Ans: In CAPL, enum data types are treated in a manner similar to strings because values
are initialized with symbolic names to represent integer constants. Even though the
CAPL language does not support the enum data type, the database editor allows the
enum type to be defined for all attribute objects. When CAPL needs to reference an
enumtype attribute, use the strncpy() function. Below is an example of how to get the
value of an enum-type message attribute that is defined for the receiver node’s symbolic
name.

Example: enum State {isOn, isOff, isError};


enum State state;
state = (enum State) isOn;
switch (state) {
case isOn:
write("It is on.");
break;
case isOff:
write("It is off.");
break;
case isError:
write("There is an error.");
break;
}
if (state == isOn)
write("OK");

10. Can you send signals using CAPL without having database?

Ans: Yes, we can send signals using CAPL scripting without having database. By using
the system variables we can send.

11. Explain difference between C & CAPL?

Ans: The major difference between C and CAPL is: C is a Structure oriented
programming language, whereas CAPL is event based programming language. The
main() function is not supported in CAPL.As there are no header files to be linked, no
preprocessor is required because.
C programmers will also be pleased to notice other simplifications:
 In CAPL you do not have to declare a function prototype before you can use it.
 CAPL does not use classes or structures – templates that define the characteristics
and behaviors of an object.
 Functions such as scanf() are not supported because CAPL has no input stream.
However, CAPL does have events defined for pressing a key or keys. Inputs can also be
made using environment variables through user configurable interfaces called panels.

12. What are the limitations of CAPL?

Ans: Limitations of CAPL:


CAPL is limited more by available PC resources than by its internal architecture and
operation. As an example, high-speed gateways between CAN and other UARTbased
protocols were used to determine where the boundaries might lie. Laptops were
exchanged to see the effects of increased speed, which showed it is quite difficult to
deliver consistent qualitative numbers. Many CANoe models use c.40 concurrently
running CAPL programs to simulate an entire car in real time. The model is also capable of
interconnecting to real modules or sub-system portions of a real vehicle.

13. What is the difference between global and static global variables?

Ans: Global variables are variables defined outside of any function. Their scope starts at
the point where they are defined and lasts to the end of the file. They have external
linkage, which means that in other source files, the same name refers to the same location
in memory.
Static global variables are private to the source file where they are defined and do not
conflicts with other variables in other source files which would have the same name.
5. REALTIME QUESTIONS
1. What is about Black Box? What is the difference between Block Box and White
Box Testing?

Ans: Block Box Testing: Black box testing is a software testing techniques in which
functionality of the software under test (SUT) is tested without looking at the internal
code structure, implementation details and knowledge of internal paths of the software.
This type of testing is based entirely on the software requirements and specifications. In
Black Box Testing we just focus on inputs and output of the software system without
bothering about internal knowledge of the software program.

Types of Black Box Testing


There are many types of Black Box Testing but following are the prominent ones –
 Functional testing - This black box testing type is related to functional requirements
of a system; it is done by software testers.
 Non-functional testing - This type of black box testing is not related to testing of a
specific functionality , but non-functional requirements such as performance,
scalability, usability.
 Regression testing - Regression testing is done after code fixes , upgrades or any
other system
3. Explain about System Level Testing, Unit Testing, and Integration Testing?
Ans:

Unit testing - testing performed on each module or block of code during development. Unit
testing is normally done by the programmer who writes the code.

Integration testing - testing done before, during and after integration of a new module into
the main software package. This involves testing of each individual code module. One
piece of software can contain several modules which are often created by several different
programmers. It is crucial to test each module's effect on the entire program model.

System testing - testing done by a professional testing agent on the completed software
product before it is introduced to the market.

Acceptance testing - beta testing of the product done by the actual end users.

Types of System Testing: There are more than 50 types of System Testing. Below we have
listed types of system testing a large software development company would typically use:

1. Usability Testing - Usability testing mainly focuses on the user's ease to use the
application, flexibility in handling controls and ability of the system to meet its objectives

2. Load Testing - Load testing is necessary to know that a software solution will perform
under real life loads.

3. Regression Testing - Regression testing involves testing done to make sure none of the
changes made over the course of the development process have caused new bugs. It also
makes sure no old bugs appear from the addition of new software modules over time.
4. Recovery Testing - Recovery testing is done to demonstrate a software solution is
reliable, trustworthy and can successfully recoup from possible crashes.

5. Migration Testing - Migration testing is done to ensure that the software can be moved
from older system infrastructures to current system infrastructures without any issues.

6. Functional Testing - Also known as functional completeness testing, functional testing


involves trying to think of any possible missing functions. Testers might make a list of
additional functionalities that a product could have to improve it during functional testing.

7. Hardware/Software Testing - IBM refers to Hardware/Software testing as "HW/SW


Testing". This is when the tester focuses his/her attention on the interactions between the
hardware and software during system testing.

II. Unit Testing: Unit testing of software applications is done during the development
(coding) of an application. The objective of unit testing is to isolate a section of code and
verify its correctness. In procedural programming a unit may be an individual function or
procedure. The goal of unit testing is to isolate each part of the program and show that the
individual parts are correct. Unit testing is usually performed by the developer.

Why do Unit Testing? Why it is important?

Sometimes software developers attempt to save time by doing minimal unit testing. This
is a myth because skimping on unit testing leads to higher defect fixing costs during
system testing, integration testing and even beta testing after the application is completed.
Proper unit testing done during the development stage saves both time and money in the
end.

III. Integration Testing: In Integration Testing, individual software modules are integrated
logically and tested as a group. A typical software project consists of multiple software
modules, coded by different programmers. Integration testing focuses on checking data
communication amongst these modules. Hence it is also termed as 'I & T' (Integration and
Testing), 'String Testing' and sometimes 'Thread Testing'.

Need of Integration Testing:


Although each software module is unit tested, defects still exist for various reasons like
 A Module in general is designed by an individual software developer whose
understanding and programming logic may differ from other programmers.
Integration testing becomes necessary to verify the software modules work in unity
 At the time of module development, there are wide chances of change in
requirements by the clients. These new requirements may not be unit tested and
hence integration testing becomes necessary.
 Interfaces of the software modules with the database could be erroneous
 External Hardware interfaces, if any, could be erroneous
 Inadequate exception handling could cause issues.

4. Explain Manual Testing and Automation Testing?

Ans:
I. Manual Testing: In Manual Testing, Testers manually execute test cases without using
any automation tools. Manual testing is the most primitive of all testing types and helps
find bugs in the software system. Any new application must be manually tested before its
testing can be automated. Manual testing requires more effort, but is necessary to check
automation feasibility.
II. Automation Testing: Manual testing is performed by a human sitting in front of a
computer carefully executing the test steps. Automation Testing means using an
automation tool to execute your test case suite.

7. Define Verification & Validation?

Ans: Verification and Validation (V&V) is the process of checking that a software system
meets specifications and that it fulfills its intended purpose. It is normally part of the
software testing process of a project.
According to the Capability Maturity Model (CMMI-SW v1.1),

Verification: The process of evaluating software to determine whether the products of a


given development phase satisfy the conditions imposed at the start of that phase.
Validation: The process of evaluating software during or at the end of the development
process to determine whether it satisfies specified requirements.
Verification shows conformance with specification; validation shows that the program
meets the customer’s needs.

8. Explain STLC?

Ans: Contrary to popular belief, Software Testing is not a just a single activity. It consists
of series of activities carried out methodologically to help certify your software product.
These activities (stages) constitute the Software Testing Life Cycle (STLC). The different
stages in Software Test Life Cycle –
Each of these stages have a definite Entry and Exit criteria , Activities & Deliverables
associated with it. In an Ideal world you will not enter the next stage until the exit criteria
for the previous stage is met. But practically this is not always possible. So for this tutorial,
we will focus of activities and deliverables for the different stages in STLC.

9. Explain SDLC?

Ans: SDLC stands for Software Development Life Cycle. A Software Development Life
Cycle is essentially a series of steps, or phases, that provide a model for the development
and lifecycle management of an application or piece of software. There are different types
of SDLC are available. They are:
I. V-Model
II. Waterfall Model
III. Incremental Model
IV. RAD Model
V. Spiral Model, etc…
In those, here we explained mostly used two models. V-Model and Waterfall Model.

I. V-Model: V- model means Verification and Validation model. Just like the waterfall model,
the V-Shaped life cycle is a sequential path of execution of processes. Each phase must be
completed before the next phase begins. Testing of the product is planned in parallel with
a corresponding phase of development.
The various phases of the V-model are as follows:
Requirements like BRS and SRS begin the life cycle model just like the waterfall model.
But, in this model before development is started, a system test plan is created. The test
plan focuses on meeting the functionality specified in the requirements gathering.
The high-level design (HLD) phase focuses on system architecture and design. It provides
overview of solution, platform, system, product and service/process. An integration test
plan is created in this phase as well in order to test the pieces of the software systems
ability to work together.
The low-level design (LLD) phase is where the actual software components are designed. It
defines the actual logic for each and every component of the system. Class diagram with all
the methods and relation between classes comes under LLD. Component tests are created
in this phase as well.
The implementation phase is, again, where all coding takes place. Once coding is complete,
the path of execution continues up the right side of the V where the test plans developed
earlier are now put to use.
Coding: This is at the bottom of the V-Shape model. Module design is converted into code
by developers.
Advantages of V-model:
 Simple and easy to use.
 Testing activities like planning, test designing happens well before coding. This
saves a lot of time. Hence higher chance of success over the waterfall model.
 Proactive defect tracking – that is defects are found at early stage.
 Avoids the downward flow of the defects.
 Works well for small projects where requirements are easily understood.

Disadvantages of V-model:
 Very rigid and least flexible Software is developed during the implementation phase,
so no early prototypes of the software are produced.
 If any changes happen in midway, then the test documents along with requirement
documents has to be updated.

When to use the V-model:

 The V-shaped model should be used for small to medium sized projects where
requirements are clearly defined and fixed.
 The V-Shaped model should be chosen when ample technical resources are available
with needed technical expertise. High confidence of customer is required for
choosing the V-Shaped model approach. Since, no prototypes are produced, there is
a very high risk involved in meeting customer expectations.

II. Waterfall Model: The Waterfall Model was first Process Model to be introduced. It is also
referred to as a linear-sequential life cycle model. It is very simple to understand and use.
In a waterfall model, each phase must be completed fully before the next phase can begin.
This type of model is basically used for the for the project which is small and there are no
uncertain requirements. At the end of each phase, a review takes place to determine if the
project is on the right path and whether or not to continue or discard the project. In this
model the testing starts only after the development is complete. In waterfall model phases
do not overlap. Diagram of Waterfall-model:
Advantages of waterfall model:

 This model is simple and easy to understand and use.


 It is easy to manage due to the rigidity of the model – each phase has specific
deliverables and a review process.
 In this model phases are processed and completed one at a time. Phases do not
overlap.
 Waterfall model works well for smaller projects where requirements are very well
understood.

Disadvantages of waterfall model:

 Once an application is in the testing stage, it is very difficult to go back and change
something that was not well-thought out in the concept stage.
 No working software is produced until late during the life cycle.
 High amounts of risk and uncertainty.
 Not a good model for complex and object-oriented projects.
 Poor model for long and ongoing projects.
 Not suitable for the projects where requirements are at a moderate to high risk of
changing.

When to use the waterfall model:


 This model is used only when the requirements are very well known, clear and
fixed.
 Product definition is stable.
 Technology is understood.
 There are no ambiguous requirements
 Ample resources with required expertise are available freely
 The project is short.
Very less customer enter action is involved during the development of the product. Once
the product is ready then only it can be demoed to the end users. Once the product is
developed and if any failure occurs then the cost of fixing such issues are very high,
because we need to update everywhere from document till the logic.

10. Explain about Defect Life Cycle/Test Defect Life Cycle? Or Bug Life Cycle?

Ans: Defect life cycle is a cycle which a defect goes through during its lifetime. It starts
when defect is found and ends when a defect is closed, after ensuring it’s not reproduced.
Defect life cycle is related to the bug found during testing. The bug has different states in
the Life Cycle. The Life cycle of the bug can be shown diagrammatically as follows:

Bug or defect life cycle includes following steps or status:

1. New: When a defect is logged and posted for the first time. It’s state is given as new.
2. Assigned: After the tester has posted the bug, the lead of the tester approves that the
bug is genuine and he assigns the bug to corresponding developer and the developer team.
It’s state given as assigned.
3. Open: At this state the developer has started analyzing and working on the defect
fix.
4. Fixed: When developer makes necessary code changes and verifies the changes then
he/she can make bug status as ‘Fixed’ and the bug is passed to testing team.
5. Pending retest: After fixing the defect the developer has given that particular code for
retesting to the tester. Here the testing is pending on the testers end. Hence its status is
pending retest.
6. Retest: At this stage the tester do the retesting of the changed code which developer
has given to him to check whether the defect got fixed or not.
7. Verified: The tester tests the bug again after it got fixed by the developer. If the bug is
not present in the software, he approves that the bug is fixed and changes the status to
“verified”.
8. Reopen: If the bug still exists even after the bug is fixed by the developer, the tester
changes the status to “reopened”. The bug goes through the life cycle once again.
9. Closed: Once the bug is fixed, it is tested by the tester. If the tester feels that the bug no
longer exists in the software, he changes the status of the bug to “closed”. This state means
that the bug is fixed, tested and approved.
10. Duplicate: If the bug is repeated twice or the two bugs mention the same concept of
the bug, then one bug status is changed to “duplicate“.
11. Rejected: If the developer feels that the bug is not genuine, he rejects the bug. Then
the state of the bug is changed to “rejected”.
12. Deferred: The bug, changed to deferred state means the bug is expected to be fixed in
next releases. The reasons for changing the bug to this state have many factors. Some of
them are priority of the bug may be low, lack of time for the release or the bug may not
have major effect on the software.
13. Not a bug: The state given as “Not a bug” if there is no change in the functionality of
the application. For an example: If customer asks for some change in the look and field of
the application like change of color of some text then it is not a bug but just some change
in the looks of the application.

12. Who will give you Data Base?

Ans: Client will give the database. Developers will develop the Database. Client will give
it to us for testing the equipment.

16. Can you add signals manually to the Graphics Window and Statics Window and
Data Window?

Ans: Yes, we can add signals manually by drag and drop method and also by right
clicking in the window, there we can find add signal tab. In those two process we can
add signals manually.

17. Explain about CANdela Studio?

Ans: CANdela Studios is used to create the Diagnostic Data Base for the testing using
CANoe/CANalyzer.

19. How can you Identify the whether the car is Diesel Car or Petrol Car?

Ans: Diesel engines, unlike petrol engines which rely on a spark to ignite the air-fuel
mixture, function due to the auto-ignition of diesel fuel when subjected to high pressures.
Under high pressure, the temperature of the diesel fuel increases to a point where the fuel
self-combusts. In cold weather however, this temperature is not always achieved and glow
plugs assist by heating the air-fuel mixture to assist in cold starting. Put simply, glow plugs
are small heaters.

20. How to change the baud rate in CANoe without changing the code?

Ans: The bit rate may be changed by either changing the oscillator frequency, which is
usually restricted by the processor requirements, or by specifying the length of the bit
segments in “time quantum” and the pre-scalar value. In Canoe tool, we can change the
bus timing register 0 & 1 values for correcting the baud rate. In Autosar, we can use post
build configuration for CAN baud rate values.

22. How air conditioners work in cars?

Ans: Air conditioners are based on the principles of evaporation and condensation and
then compression and expansion. The hot air of the car is removed by the process of
evaporation and then the condensation of the evaporated air takes places which is then
further compressed by the compressor and then finally expanded to us in the form of cold
breeze. Somehow, Air conditioning reduces the average of the car,

Here I am giving some websites for reference.


CAN : http://www.kvaser.com/software/7330130980914/V1/can2spec.pdf
CAPL :
https://www.vector.com/portal/medien/vector_cantech/faq/ProgrammingWithCAPL
.pdf
http://www.cannewsletter.
org/assets/files/media/raw/778c5e06c68f2486a54599e245d18ff7.pdf
http://vector.com/portal/medien/vector_cantech/faq/CAPLFunctionReferenceManua
l.pdf
CANoe Tool Software:
www.vector.com
http://vector.com/portal/medien/cmc/info/CANoe_ProductInformation_EN.pdf
For all Testing Models, Life Cycles and for JIRA Toll:
www.guru99.com
http://istqbexamcertification.com/
For C-Language:
http://phy.ntnu.edu.tw/~cchen/ctutor.pdf

Potrebbero piacerti anche