Controller Area Network (CAN) Message
The message consists of the following components
- Identifier ("flag"), which indicates the message's identity and priority.
- Data information (value, information, etc.).
- Check sum, used to check that the message has arrived correctly
- Stop signal, which indicates that the message has finished.
A complete CAN-message is called a frame.
Conflicts can occur in a network when several control modules wish to send a message at the same time. For example when the driver presses the brake pedal at the same time as the passenger changes the climate control settings and a passenger in the rear seat opens the power window.
For safe function the messages have to be prioritized. In addition the time delays which occur in case of queue situations must be held within reasonable limits. This is so that the customer does not experience the system as "sluggish" or slow.
To solve problems with conflicts and time delays there is a priority order of messages to ensure good functionality.
Prioritizing of messages is determined by the number of zeroes at the beginning of a message, the more zeroes the higher the priority.
Prioritizing occurs as follows
- When the network is available, all the control modules that have "something to say" send bit one in their message.
- All the control modules detect what has been transmitted on the network
- If a control module has transmitted 0 those that have sent 1 stop and wait until the next time the network is available
- Those that transmitted 0 transmit bit two of the message
- If a control module has transmitted 0 as bit two those that have sent 1 stop and wait until the next time the network is available and so on.
The message with the highest priority (most zeroes at the beginning) "wins" and is sent first.
The end of a message is seven zeroes. The control modules then know that the network is available and a new message can be sent in priority order.
There are two types of message in the system
- Periodical frames . These messages are sent regularly and give the status of a parameter. They are used for information which is frequently updated, speed signals for example.
- Event frames , which are only sent when predetermined conditions have been met. This type of message is used for things that seldom occur, raising / lowering a window for example.
The message can contain an update bit which states how "fresh" the information is.
The system assumes that the receiver has received the message so an acknowledgment is not sent (a reply is only sent to a direct question from another control module).
However, the receiver "knows" how often it should receive a message about which status applies. If the message is missing, the receiver can connect an emergency program and/or generate a diagnostic trouble code.
Diagnostic trouble codes (DTCs) can also be stored if the receiving control module does not "understand" the message it has received. Examples of this may include intermittent short-circuits between one of the CAN wires and voltage or earth.