IO601 - LIN Master Read v2
IO601 - LIN Master Read v2 — This block allows LIN
messages to be received
Library
Simulink Real-Time - Speedgoat

Description
This block allows LIN messages to be received. The message information (LIN
version, ID, DLC) can be set in the block mask.
The buffer size is 50 messages per channel. Take precaution when defining the
settings of the baud rate and the "LIN Master Read" block's sample time to avoid
overflows on the input buffer.
For each LIN message a single read block is required.
Ports
Outputs
-
State
Message status:
Data
Type:int8
- Info
Message information:
Data
Type:uint8
- Error Code
Error code:
0: No error
1: Bit error
2: Checksum error
3: Parity error
4: Slave is not responding
5: Sync break error
6: Inconstant sync break field
7: More data is expected
8: Timeout after start sync break field
9: Timeout after sync break field
10: Timeout after sync field
11: Slave not started
12: LIN parameter error
Data
Type:uint16
-
Timestamp
The Timestamp of the LIN message received. Resolution is 125µs.
Data
Type:uint32
-
Data
The number of bytes is defined in the block mask with the parameter
DLC. Data
Type:uint8
Parameters
-
Module ID
This ID defines the link to the corresponding Setup block
-
Sample Time
Defines the base sample time at which this driver block gets its sample hit. This
parameter can also be set to -1 for inherited
sample time. The units are in seconds.
-
LIN version
Select the LIN version:
LIN 1.X representing versions 1.1, 1.2 and 1.3 uses Classic
Checksum.
LIN 2.X representing versions 2.0, 2.1 and 2.2 uses Enhanced
Checksum except for IDs 60 and 61.
-
Identifier
Message ID of the LIN message without parity protection. Valid values are in
the range 0 through 63.
![[Caution]](images/caution.png) | Caution |
|---|
LIN specifies the Protected ID (PID) to be a 8-bit value, where bits 7 and
8 contain parity sums over the other bits. The ID therefore consists of bits
1 through 6. |
-
DLC
Identifies the length of the LIN message data array (Data Length
Code). The value can be chosen in the range of 1 through 8.
![[Caution]](images/caution.png) | Caution |
|---|
LIN version 1.1 defines the DLC as a function of the ID (0-31: 2;
32-47: 4; 48-63: 8). |
- Enable message state
Enables the output port for the message state.
- Enable message info
Enables the output port for message information.
- Enable error code
Enables the output port for the error code.
- Enable Timestamp
Enables the output port for the Timestamp.
-
Message Type
Currently only the message type RAW is supported.