Documentation search search close
CONTENTS
https://www.speedgoat.com/help/slrt/page/icon_documentation.jpg
v10.0.1.x for R2026a
View other versions

IO602/IO603/IO691 - LIN Read

IO602/IO603/IO691 - LIN Read — Read messages from the LIN channel

Library

Simulink Real-Time - Speedgoat

Description

[Note]Note

LIN is currently only available for the IO603 I/O module.

This LIN Read driver block is part of the generic block library for the IO602-2, IO602-4, IO603 and IO691 modules.

This block allows LIN messages to be received. The message information (LIN version, ID, DLC (Data Length Code)) can be set in the block mask.

The buffer size is 20 messages per channel, therefore, depending on the selected baud rate and the LIN Read block sample times, be careful to not let the input buffer overflow.

For each LIN message, a single Read block is required.

Ports

Outputs
Timestamp

The timestamp indicating how many seconds after model start the LIN message was received. The resolution is 1 µs.

Data

The number of bytes is defined in the block mask with the parameter DLC. When using the LIN Unpack block, the parameter DLC must always be set to 8. For more information on using the LIN Unpack block, refer to the usage notes of this I/O module.

Data Type: uint8

Parameters

Module ID

This ID defines the link to the corresponding Setup block

Channel Number

Choose the LIN channel to which this driver block should be connected.

LIN Node Type

Displays the channel mode (Disabled, Slave, Master) that has been set in the CAN and LIN Setup block for the selected Channel Number.

Identifier

Message ID of the LIN message without parity protection. Valid values are in the range 0 through 63.

[Caution]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]Caution

LIN version 1.1 defines the DLC as a function of the ID (0-31: 2; 32-47: 4; 48-63: 8).

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.