IO601 - CAN Setup v4
IO601 - CAN Setup v4 — Configure the IO601 CAN
interface
Library
Simulink Real-Time - Speedgoat

Description
Your model must contain one "CAN Setup" driver block for each IO601 module in your
target machine. This block allows all of the supported I/O types of this module to
be configured and therefore impacts on the other driver blocks (CAN Write, CAN
Read, and CAN Status).
Ports
This driver block has no input or output ports.
Parameters
Module setup
-
Module ID
The Module ID has two functions:
It defines the logical connection between the Setup block and its I/O
blocks
It also informs the auto-search feature of the PCI Slot parameter. If
only one I/O module of this type is installed, the Module ID must be set
to 1. If n modules are installed, it
must be in the range 1:n. Not all the I/O modules installed in the
target machine need to be used. To see how each I/O module maps to a
Module ID, use this Speedgoat API:
speedgoat.getIoInterfaces("TargetName", "mySpeedgoat")
-
Init structure
Defines CAN messages sent during initialization of the Write block.
For more information, see: Initialization and
Termination CAN Messages.
-
Term structure
Defines CAN messages sent during termination of the Write block. For
more information, see: Initialization and
Termination CAN Messages.
-
PCI Slot (-1: auto-search)
There are two approaches for mapping this block to a specific I/O module installed
in your target machine. All modules of the same type must be configured using the
same method.
Auto-Search: with the default value -1 the I/O module will be automatically located in the
target machine. If you have multiple modules of the same kind, the
Module ID defines which module is associated with this block. To see how
each I/O module maps to a Module ID, use this Speedgoat API:
speedgoat.getIoInterfaces("TargetName", "mySpeedgoat")
Explicit Addressing: to explicitly define the logical address of the
I/O module in the target machine, you can provide the PCI bus and slot
numbers as a vector: [bus, slot]. To determine these numbers, run the
following command in the MATLAB command window:
speedgoat.getIoInterfaces("TargetName", "mySpeedgoat", "Advanced", true)Note
that the PCI address can change whenever an I/O module is added or
removed – usually, auto-search is the best option.
CAN Channel 1
-
Enable
When enabled, the CAN 1 channel is initialized at target application
download time. By default the box is checked. If unchecked, it is
assumed that the model does not contain a Write block to transmit to the
CAN 1 channel, or a Read block to receive from the CAN 1 channel.
-
Physical bus
The transceiver mode for this CAN channel. The options are:
Highspeed (default)
Lowspeed
-
Baud rate
The baud rate for this CAN channel. This control allows the most
commonly used values to be selected. If special bit timing is needed,
then select the User defined here and use the "User defined baud rate"
parameter below.
-
User defined baud rate
If "User defined" has been selected in the "Baud rate" parameter
above, this parameter is used to configure the bit timing. The parameter
is a vector with the following elements:
For information concerning the IO601 bit-timing values, please contact
technical support (support@speedgoat.com) to obtain the
"IO601_bit_timing.pdf" manual.
-
Acceptance (standard identifier)
The rule to decide whether a CAN message with a standard ID (11 bits)
is accepted on CAN channel 1. The message is accepted if either of the
following rules is true:
Set a StdMask element to zero (the default) to disable a rule. Note
that this parameter takes a decimal value. See the "Usage notes" section
for examples of how to set this parameter.
-
Acceptance (extended identifier)
The rule to decide whether a CAN message with an extended ID (29 bits)
is accepted on CAN channel 1. The message is accepted if either of the
following rules is true:
Set an ExtMask element to zero (the default) to disable a rule. Note
that this parameter takes a decimal value. See the "Usage notes" section
for examples of how to set this parameter.
CAN Channel 2
-
Enable
When enabled, the CAN 2 channel is initialized at target application
download time. By default the box is checked. If unchecked, it is
assumed that the model does not contain a Write block which transmits to
CAN 2 channel, or a Read block which receives from CAN 2 channel.
-
Physical bus
The transceiver mode for this CAN channel. The options are:
Highspeed (default)
Lowspeed
-
Baud rate
The baud rate for this CAN channel. This control allows the most
commonly used values to be selected. If special bit timing is needed,
then select the User defined here and use the "User defined baud rate"
parameter below.
-
User defined baud rate
If "User defined" has been selected in the "Baud rate" parameter
above, this parameter is used to configure the bit timing. The parameter
is a vector with the following elements:
For information concerning the IO601 bit-timing values, please contact
technical support (support@speedgoat.com) to obtain the
"IO601_bit_timing.pdf" manual.
-
Acceptance (standard identifier)
The rule to decide whether a CAN message with a standard ID is
accepted on CAN channel 2. The message is accepted if either of the
following rules is true:
Set a StdMask element to zero (the default) to disable a rule.
-
Acceptance (extended identifier)
The rule to decide whether a CAN message with an extended ID is
accepted on CAN channel 2. The message is accepted if either of the
following rules is true:
Set an ExtMask element to zero (the default) to disable a rule.
LIN Channel 1
-
Role
The IO601 can be configured to act as a master or a slave. In the LIN
topology, only one master is allowed per network.
-
Baud rate
This parameter is valid for master and slave operation. Range between
2400 and 20000.
-
LIN v2.x (enhanced check sum)
When enabled, the IO601 will use the enhanced check sum as defined in
the LIN 2.0 (and newer) specification. Otherwise, the classic check sum
(up to LIN 1.3) is applied.