Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

LIN Scheduler Block




This block essentially implements a LIN Scheduler based on schedule tables; it is capable of generating the appropriate timing sequence to activate the corresponding LIN Id frame transmission.


Master Time BaseThis parameter specifies the used time base in the master node to generate the maximum allowed frame transfer time. The time base is specified in milliseconds
JitterThe jitter value specifies the differences between the maximum and minimum delay from time base start point to the frame header sending start point (falling edge of BREAK signal). The jitter shall be specified in milliseconds.

This parameter should be expressed in percentage and it affects directly the generation of clock signal used by LIN Schedulerto synchronize the tasks execution. The following set of equations describes the behavior and limits of this parameter.

PDC = N*Ts where N = 1,2,3...

NDC = M*Ts where M = 1,2,3...

Writing NDC as a function of MTB


M = (MTB / Ts) - N

Then NDC equations can be re-written as follows

NDC = ( MTB / Ts- N )*Ts

Ratio = PDC / MTB

Ratio = N*Ts / MTB where N = 1,2,3... and  0 < Ratio < 1

Other ways to express the previous equation could be as an inequality

Ratio ≥ Ts / MTB

Expressed as percentage:

Ratio ≥ (Ts / MTB)*100 where 0 < Ratio > 100%

PDCPositive Duty Cycle
NDCNegative Duty Cycle
MTBMaster Time Base
TsSimulation Time

Note: Same results are obtained if using NDC = (1 - Ratio)*MTB.

If this parameter is updated by the user, it should contain enough decimals to obtain an accurate calculation of LIN Scheduler clock signal; when this parameter is calculated during model auto-generation, the result's accuracy is assured.

Number of Scheduler TablesThis parameter controls the number of available inputs intended to read schedule tables.
CAN ID OffsetThis parameter is directly related to a PCAN-LIN Configuration tool feature. Both values should match in order to have this block functional. This parameter should be entered in decimal format. For further detail please refer to Parameters Definitions of PCAN-LIN configuration tool.

Note: This file is accessible through help file of example model_1 of PEAK Systems product.


Desired TableThis input sets the current schedule table.
TableNThis input reads the schedule table N.

Schedule table must be an array of numeric elements with the following format:

TableNumComm Type1Comm Type1...Comm TypeN
TableNumThis table entry is the identifier of the schedule table; it goes from 1 up to the number of available tables.
IdNThis table entry represents the LIN Id and it should be of type double.
DelayNThis table entry must be specified in number of times the Master Time Base according to the following equation:
DelayN=Master Time Base / frame_time
frame_timeThe time_frame specifies the time interval between two neighbouring frames. This time must be longer than the maximum allowed frame transfer time and it shall be exact multiple of the master node's time base value. The frame_time value shall be specified in milliseconds.
Comm TypeNThis table entry represents the configuration of the LIN Id in the same column according to the following table:

Communication Type Id Cfg Entry Value 
Master Send Req/Slave Resp Data1
Master Send Data/ Slave Receive Data -1
LIN Id not used 0


Ids CfgThis output generates a 64-entry vector representing the configuration for each one of the LIN Ids; In other words, this output reports the third row of the schedule table (Comm Type).

This output generates the control signal for the specified LIN Id; this control signal is a 3-element vector carrying the following information:

  • Scheduler Tick signal: It is a rising impulse signal with duration of one calculation step to stimulate the OpCanAc2_LDF_SendData or OpCanAc2_LDF_SendRespData blocks to transmit either a Data Frame or a Request Frame.
  • Cfg LIN Id: This vector entry contains the corresponding LIN Id configuration; it is of the Comm Type.
  • CAN Id: This vector element contains the CAN counterpart of the LIN Id in question. This value is calculated automatically from the schedule table taking into account the CAN ID Offset parameter.
Ref1LIN Configuration Language Specification Revision 1.3, Dec. 12, 2002; Page 11.
Ref2LIN Configuration Language Specification Revision 1.3, Dec. 12, 2002; Page 16.

Characteristics and Limitations

Direct FeedthroughN/A
Discrete sample timeN/A
XHP supportYes
Work offlineNo

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323