IO611 - LIN Master Read
IO611 - LIN Master Read — Read messages from the LIN
channel
Library
Simulink Real-Time - Speedgoat

Description
Read messages from the LIN channel
Ports
All the input and output ports of this block are vectors with as many elements as
messages are configured to be read per sample hit. Except the number of elements of
the data output port is 8 times the number of configured messages.
Per configured message, there will be a read transfer on the LIN bus every sample
hit. The received message is put to the outputs within the same sample time.
Inputs
-
Prot.ID
The LIN identifier (ID). Range 0 to 63.
Data
Types:uint8
-
Checksum
Checksum version to use in the read request:
0: Classic Checksum (LIN 1.1, LIN 1.2, LIN 1.3)
1: Enhanced Checksum (LIN 2.0, LIN 2.1, LIN 2.2)
Data
Types:uint8
-
Data Len
Data length code (DLC) for the read request. Range 0 to 8.
Data
Types:uint8
Outputs
-
Prot.ID
The LIN identifier received. Range 0 to 63. Parity P0 and P1 are
removed by the driver.
If an error message has been received (See output "Msg Type" below),
this output will contain the error code. The following error codes are
possible:
0: no error
1: bit error
2: checksum error
3: parity error
4: no answer from slave
5: Sync break error
6: Inconsistent sync break field
7: More data expected
8: Timeout after start of sync break field
9: Timeout after sync break field
10: Timeout after sync field
11: Slave didn't start
12: LIN parameter error
Data
Types:uint32
-
Msg Type
This port can take three possible values:
0: Dataframe message
2: Error message
3: Wakeup message
If the message type is "Error message", the error code
is written to the "Prot.ID" output. The error codes are listed
above.
Data
Types:uint32
-
Checksum
Checksum version used in the received message:
0: Classic Checksum (LIN 1.1, LIN 1.2, LIN 1.3)
1: Enhanced Checksum (LIN 2.0, LIN 2.1, LIN 2.2)
Data
Types:uint32
-
Data Len
Data length code (DLC) of the received message. Range 0 to 8.
Data
Types:uint32
-
Data Overrun
This field contains 3 bits of message information.
Bit 0: 1 signalizes an overrun of the data buffer
Bit 1: 0 if message received, 1 if message sent
(self-receipt)
Bit 2: 1 if the message contains no data
In case of a self-receipt, this output will be equal to
2 (bit 1 set).
Data
Types:uint32
-
Timestamp
The timestamp for receipt of the LIN message. The resolution is 1µs,
so in order to get a double value in seconds, the block output must be
converted to double and multiplied by 1e-6. This 1µs resolution is given
by the hardware implementation of the IO61X modules. The time is reset
to zero at each model start.
Data
Types:uint32
-
Data
The message data. The LIN protocol allows for messages with up to
eight data bytes. If N messages are configured to be received per sample
hit, this vector will simply be sized N * 8.
Data
Types:uint8
Parameters
-
Module ID
Specifies the ID of the IO61X module this driver block should be
connected to. It must correspond to the module ID of the according setup
block. Check the setup block help for more details.
-
Sample Time
Defines the base sample time at which this driver block gets its
sample hit. It can also be set to -1 for inherited sample time. The
units are in seconds.
-
Read Message from Channel
Choose the LIN channel to which this driver block should be connected.
-
Number of LIN Messages
Configures how many read requests to perform per sample hit. Input and
output port widths depend directly on this field. Range is 1 to 50.