LIN Communication Process

<< Click to Display Table of Contents >>

Navigation:  Protocols > LIN-Bus Basics >

LIN Communication Process

 

All information for the communication process within a LIN-Cluster is defined in a central description file – the “LIN Description File” (LDF). This communication matrix contains all details of individual nodes, messages and signals as well as the relations between nodes.

 

LIN scheduling

Additionally, the LIN schedule is included in the description file, which determines the time-triggered communication process of the LIN bus. This process is deterministic – for every frame transmitted on the bus, exactly determined time windows are available (“frame slots”). These slots are coordinated by the LIN master. During a slot, the master grants a slave exclusive access to the bus by issuing a “token” (“delegated token process”). The schedule will immediately be executed cyclically by the LIN master after the cluster has been activated.

 

Each frame consists of a “frame header” and a “frame response” – the request of the master and the response of the addressed slave. The responsible slave writes its data behind the frame header on the bus. Non-addressed slaves ignore the frame header. All bus nodes have access to the data transmitted on the bus at all times: The response data can therefore also be used and processed by other slaves, depending on their respective acceptance routine.

 

Creating LIN functionality with the CanEasy scheduler

Within CanEasy, the scheduling characteristic of a LIN bus can be directly realized with the help of the scheduler. In contrast to simulated CAN bus environments, no separate transmission control is available for LIN buses; this function is taken over by the scheduler. Timed processes are represented in scheduler tables, which include various, consecutive actions. When an LDF database is imported, included scheduling tables are automatically imported into the scheduler.

 

Additionally to the cyclically transmitted “unconditional frames” described above, “sporadic frames” and “event-triggered frames” exist. More information about various frame types can be found inside the chapter “Message structure“.

Configuration master/slave operation

The context menu of the control unit can be used to specify which control unit takes on the role of the master.

If the master control unit is set as real, CanEasy is in slave mode. In this case no scheduler tables are needed and

changes to the database are only passed on to the LIN adapter so that they can be inserted in a header frame.

If the master control unit is set as simulated, CanEasy takes on the role of the master and frames can be sent via the scheduler tables of the LIN channel.

 

Sending header frames

Sending a header frame is only possible in master mode (master control unit is set as simulated).

If a frame is sent by a control unit set as real, only the header is sent.

If the slave does not provide any data, a "No response" error is displayed in the trace window.