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
Block
Mask
Description
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.
Parameters
Master Time Base | This 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 |
---|---|
Jitter | The 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. |
Ratio | 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 | NDC = MTB - PDC = MTB -N*Ts 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% |
PDC | Positive Duty Cycle |
NDC | Negative Duty Cycle |
MTB | Master Time Base |
Ts | Simulation 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 Tables | This parameter controls the number of available inputs intended to read schedule tables. |
---|---|
CAN ID Offset | This 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.
Inputs
Desired Table | This input sets the current schedule table. |
---|---|
TableN | This input reads the schedule table N. |
Schedule table must be an array of numeric elements with the following format:
TableNum | Id1 | Id2 | ... | IdN |
---|---|---|---|---|
TableNum | Delay1 | Delay2 | ... | DelayN |
TableNum | Comm Type1 | Comm Type1 | ... | Comm TypeN |
TableNum | This table entry is the identifier of the schedule table; it goes from 1 up to the number of available tables. |
---|---|
IdN | This table entry represents the LIN Id and it should be of type double. |
DelayN | This 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_time | The 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 TypeN | This 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 Data | 1 |
Master Send Data/ Slave Receive Data | -1 |
LIN Id not used | 0 |
Outputs
Ids Cfg | This 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). |
---|---|
ID_0xNN | This output generates the control signal for the specified LIN Id; this control signal is a 3-element vector carrying the following information:
|
Ref1 | LIN Configuration Language Specification Revision 1.3, Dec. 12, 2002; Page 11. http://www.lin-subbus.org/ |
Ref2 | LIN Configuration Language Specification Revision 1.3, Dec. 12, 2002; Page 16. http://www.lin-subbus.org/ |
Characteristics and Limitations
Direct Feedthrough | N/A |
---|---|
Discrete sample time | N/A |
XHP support | Yes |
Work offline | No |
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter