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

IO102 - Setup

IO102 - Setup — Configure the IO102 input/output blocks

Library

Simulink Real-Time - Speedgoat

Description

Your model can contain only one Setup block for each I/O module in your target machine.

The 'Setup' block dialog box allows all the supported I/O types of this module to be configured and therefore impacts on the other driver blocks (Analog input, Analog output, Digital input, Digital output).

Ports

This driver block has no input or output ports.

Parameters

All configuration settings of the IO102 module are organized in the four tabs of the Setup parameter dialog.

Main Tab
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")
Input/Output Range

Select one of the three available analog input/output ranges. The selected range applies to all analog channels for the standard module. The high voltage option (IO102-HV) has analog input ranges of ±60 V, ±30 V, and ±15 V for channels 17 to 32 (in Single-Ended mode) and channels 9 to 16 (in Differential mode). The other channels remain standard. For the high voltage channels, when selecting ±10 V (LV), ±60V (HV) is set as the HV input range. The ranges ±30 V and ±15 V are mapped to ±5 V and ±2.5 V respectively.

Autocalibration

Check this box if the module should calibrate itself the next time this model (target application) is downloaded and initialized. The autocalibration function compensates for component aging and minimizes the effects of temperature on accuracy. We recommend keeping this enabled. The calibration normally takes approximately 2 seconds, so we suggest increasing the host-target communication time-out in the model configuration parameters to allow for this. The status of the calibration is displayed on the target screen. The calibration is not re-executed during normal start/stop operation once the target application has been downloaded. All input channels are calibrated to a single internal voltage reference. Offset and gain error corrections for each channel are determined during the autocalibration process and are applied to each channel in real-time during data acquisition. Warning: During the calibration process various signals may be present at the output pins, but they will stay inside the configured voltage range.

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.

Analog Input Tab
Input Coupling

Select either Differential for 16 differentially coupled channels, or Single-ended for 32 single-ended coupled channels.

Mode

Select either Single-channel or Multiple-channel. In Single-channel mode you can only acquire one channel but can specify any channel (see the dialog field below). In Multiple-channel mode you can acquire either 2, 4, 8, 16, or 32 channels (see the dialog field below). The first channel is then always channel 1 and the last channel is always the n-th channel.

Number of Channels (2, 4, 8, 16 or 32) or Single Channel Number (1-32)

In single-channel mode enter a channel number between 1 and 32 (single-ended coupling) or 1 and 16 (differential coupling). In multiple-channel mode enter either 2, 4, 8, 16 or 32 (32 is only valid with single-ended coupling). This defines the number of channels to acquire.

Analog Output Tab
Active Channels

Select the active input/output channels in a vector. A defined number of channels can be selected using square brackets, for example [1 2 3]. A sequence of channels can be selected using a colon, for example, 1:4.

Initial Values

Define the initial signal level present on the outputs after the application has been downloaded. The values can be set individually by entering a vector: the value at a certain position in the Initial Values vector is applied to the channel as defined in the Active Channels vector. A scalar value applies to all the channels; for example, for individual values, type "[1 1.5 0 2.5]", and to set all channels to zero, type "0".

Reset to Initial Values

Define whether the initial values are also applied once the application has stopped. The behavior can be set individually for each channel using a vector. A scalar value applies to all the channels; for example, for individual values, type "[1 0 0 1]", and to set all channels to zero, type "0". "1" means use the Initial Value and "0" means keep the latest value.

Digital I/O Tab
Direction Channels 1-8

Select the direction for the first channel group (1–8). It can be either set as input or output.

Direction Channels 9-16

Select the direction for the second channel group (9–16). It can be either set as input or output.

Active Output Channels

Depending on the direction setting, values for the output vector needs to be in the range of the corresponding channels group. This driver allows the selection of individual digital channels in any order. The number of elements defines the number of digital channels used. For example, to use two of the digital output channels, enter [1,2].

Initial Values

Define the initial signal level present on the outputs after the application has been downloaded. The values can be set individually by entering a vector: the value at a certain position in the Initial Values vector is applied to the channel as defined in the enabled channels. A scalar value applies to all the channels; for example, for individual values, type "[1 0 0 1]", and to set all channels to zero, type "0".

Reset to Initial Values

Define whether the initial values are also applied once the application has stopped. The behavior can be set individually for each channel using a vector. A scalar value applies to all the channels; for example, for individual values, type "[1 0 0 1]", and to set all channels to zero, type "0". "1" means use the Initial Value and "0" means keep the latest value.

Active Input Channels

Depending on the direction setting, values for the input vector needs to be in the range of the corresponding channels group. This driver allows the selection of individual digital channels in any order. The number of elements defines the number of digital channels used. For example, to use two of the digital input channels, enter [1,2].