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

IO360-A-190k - Setup

IO360-A-190k - Setup — Setup the IO360-A-190k configurable I/O module

Library

Library: Speedgoat

Description

Use the Setup block to define the functionality of this I/O module by selecting a configuration file. You can also use this block to configure all the digital I/O pins (pull resistors, I/O voltage, termination, etc.) of this configurable I/O module.

Your model must contain a Setup block for every configurable I/O module you intend to use.

Ports

This driver block has no input or output ports.

Parameters

Module setup Tab

Hardware

Select the name of the configurable I/O module for which you are defining the setup parameters.

Configurable I/O Module ID

The Module ID identifies the configurable I/O module in the target machine and creates a logical connection to all the code module blocks associated with this I/O module. The Module ID of all the code module blocks intended for use with a specific I/O module in your machine must match the Module ID in the IO3xx Setup block.

Unlike other module types, the Module ID parameter must be unique for each Simulink-programmable and configurable I/O module. To obtain the Module ID for use with your I/O modules, run the following Speedgoat API in the MATLAB command window:

>> speedgoat.getIoInterfaces

                Slot            IO_Interface          ModuleID
                _________    _______________________    ________

                Host Link    Onboard Ethernet (I219)       -
                IO731_1      IO731 (I210)                  1
                2            IO336-325k                    3
                3            IO334-325k                    4
                4            IO334-325k                    1
                5            IO344-930k-27DR               2
[Important]Important

If your target machine contains more than one configurable or Simulink-programmable I/O module of the same type (e.g. 2x IO334-325k), but the model does not contain IO3xx Setup blocks for all of these modules, use explicit addressing for the PCI Slot parameter to clarify the module you want to use.

Example Setup for a Target Machine with the I/O Modules Listed Above:

To run a model with PWM Generation on the IO336-325k in slot 2 and PWM Capture on the IO334-325k in slot 3, configure two IO3xx Setup blocks: one with ModuleID=3 for the IO336, and one with ModuleID=4 for the IO334. As there are two IO334 I/O modules in the machine, use explicit addressing for the PCI Slot parameter. Finally, set the ModuleIDs of the PWM blocks: configure the PWM Generation block with ModuleID=3 and the PWM Capture block with ModuleID=4.

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 type, you must use explicit addressing.

  • 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.

Configuration File (Bitstream)

This parameter defines the configuration file (bitstream) to download to the FPGA of your configurable I/O module when your Simulink model is built and the application deployed to the target machine. The configuration file defines the pin mapping and the implemented functionality (code modules). The dropdown will show installed configuration files, files located in the actual working directory and files from installed Speedgoat I/O Configuration Packages. A configuration file can also be selected from a different location by using the Browse button. The entries are automatically limited to configuration files matching the selected I/O module.

Browse...

This button opens a file explorer window to select a configuration file (.mat-file) from any location. The selected file is automatically applied as the new configuration file if compatible with the selected I/O module.

[Note]Note
Moving or renaming the file will remove the file from the dropdown, since the Setup block cannot find the file anymore.
Configuration File Information

This collapsible panel shows additional information about the selected configuration file.

Timestamp

This field shows the timestamp information of the configuration file in the format dd/MM/YY hh:mm:ss.

Revision

This field shows the revision of the selected configuration file. By default, the revision is "1.0" and increases when there are updates to the configuration file.

FPGA Frequency

This field shows the FPGA base clock for the selected configuration file. The FPGA frequency defines the base rate of the implemented functionality from a configuration file. It therefore has a direct influence on the applicable rates in code modules.

Tick time

This field shows the corresponding time of one FPGA tick for the selected configuration file. For some code modules this value is used to calculate time-related parameters.

Pin Mapping

This button opens a window with the implemented pin mapping for the currently selected configuration file. The button is only visible, if the image is included in the selected configuration file.

I/O Interface Extension Selection

Selecting a checkbox will enable the corresponding I/O interface extension. When not selected, the functionality located on the extension is disabled. The number and the type of selectable extensions depends on the configuration file.

Optimize Data Transfer

Selecting the [IOMODULE] controlled checkbox changes the data transfer behavior between the hardware and the model, as well as the model trigger behavior. When this checkbox is selected, the model must be triggered and executed in polling mode using the Interrupt Setup block. The Add Interrupt Setup Block button automatically inserts a preconfigured block into the model (if the block is not already in the model). For normal model execution, deselect [IOMODULE] controlled and remove the Interrupt Setup block from the model.

When [IOMODULE] controlled is selected and the corresponding Interrupt Setup block is available in the model, all the driver blocks with the fastest model rate combine their data transfers to and from the CPU into single DMA transfers. This feature is particularly helpful to synchronize data sampling and reduce task execution time for highly demanding closed-loop applications. For detailed information about which functionality of the selected configuration file supports optimized data transfer or DMA, open the pin mapping window using the Pin Mapping button and check the Details tab.

[Note]Note

The Interrupt Setup block must be configured as follows if Optimize Data Transfer is used:

  • The correct Interrupt Source must be selected (Speedgoat IO3xx FPGA polling)

  • The Use as Model Trigger parameter must be selected

  • The Use in Polling Mode parameter must be selected

Overload Behavior

When running a model using Optimize Data Transfer, the model triggering is controlled outside of the CPU of the target machine. If the configuration of the model sample rate is too demanding for the given setup and application, and results in a sample rate overload, select the Stop Model on Overload checkbox to control the stop behavior:

  • ON: a running model will immediately stop and throw an error as soon as the next DMA trigger was requested before the previous one was completely finished (behaves as a traditional CPU-detected task overload).

  • OFF: a running model will not stop when a new DMA Trigger was requested before the previous one was completely finished. Instead, the next requested step is triggered as soon as the previous one is finished.

[Note]Note

Allowing task overloads by deselecting Stop Model on Overload should only be used in order to optimize the model step calculation time. Adding the DMA Controller v1 driver block to the model allows you to measure the exact timing duration and see overload indications for each model step.

DMA Trigger Source

This parameter is only visible if the selected configurable I/O module and configuration file supports different trigger sources for the optimized data transfer. If the parameter is not visible, the Model Step option is used.

  • Model Step: The model will be triggered by a timer running on the configurable I/O module. The resulting sample time matches the configured sample time of the base rate (the fastest rate) in the Simulink model.

  • Others: Depending on the selected configuration file and the implemented functionality, other trigger options might be available to synchronize the model to external signals/protocols.

IO360-A-190k TTL Settings Tab

This tab allows you to define the pull resistor settings for the front I/O lines.

Settings per Port
Pull Resistors

Select the pull resistor of the digital TTL I/O lines of the corresponding port.

-2x Tab

This tab is enabled if the corresponding I/O interface extension checkbox is selected. From here you can configure the pull-resistor and I/O voltage settings of the digital I/O lines located on the -2x extension.

Settings per Port
Pull Resistors

Select the pull resistor of the digital TTL I/O lines of the corresponding port.

I/O Voltage

Select the I/O voltage of the 8 digital I/O lines of the corresponding port.