IO602 - Setup
IO602 - Setup — This block is used to configure the
IO602 I/O module
Library
Simulink Real-Time - Speedgoat

Description
Your model must contain one IO602 Setup driver block for each module in your
target machine. This block can be used to configure all the I/O types that this
module supports, and will therefore have an impact on all the other driver
blocks.
Ports
This driver block has no input or output ports.
Parameters
Tab: Configuration
-
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")
-
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.
-
Channel [1, 2, 3, 4]
Configures the respective channel (1 or 2) to communicate on CAN (HS)
according to ISO 11898-2 or CAN-FD according to ISO 11898-1. You can
also choose to disable the channel electrically.
-
Initialization Structures
Defines CAN messages sent during initialization of the Setup block.
For more information, see: Initialization and
Termination CAN Messages.
-
Termination Structures
Defines CAN messages sent during termination of the Setup block. For
more information, see: Initialization and
Termination CAN Messages.
Tab: Channel [1, 2, 3, 4]
The tab for a channel is visible only if the respective channel is not
disabled on the Configuration tab.
-
Standard Baud Rate
Select the baud rate for CAN (HS) or the arbitration baud rate for
CAN-FD. The User defined option should
be used if you require a baud rate that is not configured by default or
if a certain sample point is required. Selecting User defined enables the [BRP,
SJW, TSEG1, TSEG2] parameter.
-
[BRP, SJW, TSEG1, TSEG2]
If the User defined option has been
selected with the Standard Baud Rate
parameter, this parameter is used to configure the bit timing. The
[BRP, SJW, TSEG1, TSEG2] parameter
is a vector with the following elements:
80e6 / BRP / (1 + TSEG1 + TSEG2) equals the baud rate. The ratio
between (1 + TSEG1) and (1 + TSEG1 + TSEG2) nominates the sample point.
For additional information refer to can-wiki, info. Use the following settings with respect to
the IO602 I/O module.
-
Fast Data Baud Rate
This parameter is only available if the CAN-FD option is chosen within
the Channel parameter.
-
[BRP, SJW, TSEG1, TSEG2]
The principle is the same as for Standard Baud
Rate. The BRP of Standard Baud
Rate and Fast Baud Rate
must be equal for one channel of the IO602. Failing this, you will get
an error notification.