IO611 - CAN Read
IO611 - CAN Read — Read CAN message from one channel
of the IO611 input queue
Library
Simulink Real-Time - Speedgoat

Description
The "CAN Read" block reads messages from one channel of the IO61X input queue.
In each execution step it reads one message and indicates if more messages are
available.
See the "Usage Notes" to find out how this block can be used in a "do...while"
subsystem to prevent a possible overflow of the read buffer.
The read buffer has a capacity of 501 messages per channel.
Ports
Which output ports are available depends on the "Message type" mask setting:
CAN: Only CAN message output is available.
RAW: Data, Identifier, Length, Identifier Type and Timestamp outputs
are available.
RAW & CAN: All output ports are available.
Outputs
-
Data Present
Status signal is "1" if new data is available and "0" otherwise.
Data
Types:boolean
-
CAN Msg
The complete CAN message. Please use the "CAN Unpack" block to resolve
the data.
Data
Types:CAN_MESSAGE
-
ID
The CAN message identifier.
Data
Types:uint32
-
EFF
The identifier type (Extended Frame Format) of the CAN message.
Data
Types:uint32
-
DLC
Length of the payload data.
Data
Types:uint32
-
Timestamp
The timestamp for receipt of the CAN 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 module. The time is reset to
zero at each model start.
Data
Types:uint32
-
Data
The payload data of the CAN message.
Data
Types:uint8(8)
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 CAN channel to which this driver block should be connected.
-
Message Type
Defines how the CAN message is represented at the block outputs.
CAN: Only one "CAN Msg" output port is available. It will
always be connected to one or multiple "CAN Unpack" blocks.
RAW: The message content is presented through five output
ports: "Data", "ID", "DLC", "FF" and "Timestamp".
CAN + RAW: Both versions are displayed.
-
Output as bus
Select this option for the block to output CAN messages as a bus
signal.