IO104 - Setup
IO104 - Setup — Configure the IO104 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
Main
-
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.
-
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")
-
Inter-Module Frame Synchronisation
The IO104 features a trigger signal, which indicates the start of each
frame. It can either be generated by the card itself or it can be
connected to another source.
Initiator: Let the internal rate
generator produce the frame bursts trigger impulses based on the Frame
Time setting. The TRIGGER I/O pin is configured as output and can be
used to trigger other modules.
Target: Use the TRIGGER I/O pin as
input for triggering frame bursts. The internal rate generator is
disabled. This setting only defines the source of the trigger signal.
Both analog inputs and outputs can be configured separately to use the
trigger or not.
-
Frame Time (Burst Trigger Interval)
This is the interval time for the Trigger signal. For continuous
frame-based sampling it must be defined as the product of frame size and
sampling time. You can set a value of '-1' to have the module calculate
the correct value for continuous sampling itself. The frame time is
shared between the analog input and output channels. The time value is
divided from the module's 40.32MHz clock. This frequency value might
seem quite odd, but it is intended to produce accurate audio
frequencies, such as 24 or 48kHz.
-
Autocalibration
The autocalibration is enabled by default to obtain maximum
measurement accuracy. The autocalibration function compensates for
component aging and minimizes the effects of temperature on accuracy.
The calibration normally takes approximately 2 seconds. 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.
Analog Input 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.
-
Voltage Range for Channels [1 2 5 6]
Select the voltage range for the input channels 1, 2, 5, and 6: ±10V,
±5V or ±2.5V
-
Voltage Range for Channels [3 4 7 8]
Select the voltage range for the input channels 3, 4, 7, and 8: ±10V,
±5V or ±2.5V
-
Input Coupling
Either differential or single-ended operation is supported. This board
has dedicated differential inputs. In single-ended mode, the inverting
input ('-') is internally connected to the input return signal.
-
Use Frame Burst Trigger
If checked, the analog input frames are aligned with the Trigger
signal (see Main tab). In this case, with every Trigger impulse the
module starts the input of the defined number of samples (Frame Size) at
the speed defined by the input sampling clock (see next two parameters).
-
Input Frame Size [Samples]
Number of samples in one frame. The product of frame size and sample
time must be smaller or equal the frame trigger time.
-
Inter-Module Input Clock Synchronization
Initiator: Let the internal rate generator produce the input sampling
clock impulses based on the Input Sample Time setting (below). The INPUT
CLK I/O pin is configured as output and can be used to drive the clock
of other modules. Target: Use the INPUT CLK I/O pin as input for
clocking the input sampling. The internal rate generator is disabled.
-
Input Sample Time (Clock Generator)
This is the interval time for the input clock sampling signal. The
time value is divided from the module's internal 40.32MHz clock source
and the minimum is 0.49603μs (20/40.32MHz). The clock source is the same
for inputs, outputs and the frame burst trigger, so if the Frame Time
equals the product of Frame Size and Sample Time, a perfect alignment of
the frames is guaranteed.
Analog Output Tab
-
Simultaneous Outputs
If checked, all outputs for the Analog output block update
simultaneously in response to an output clock. An output clock updates
all output channels simultaneously with the most recent data received in
the next cycle time.
If unchecked, each output is updated immediately when new data is
received.
-
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.
-
Voltage Range
Select the voltage range for all output channels: ±10V, ±5V or ±2.5V
-
Use Frame Burst Trigger for Outputs
If checked, the analog output frames are aligned with the Trigger
signal (see Main tab). In this case, with every Trigger impulse the
module starts the output of the defined number of samples (Frame Size)
at the speed defined by the output sampling clock (see next two
parameters).
-
Output Frame Size [Samples]
Number of samples in one frame. The product of frame size and sample
time must be smaller or equal the frame trigger time.
-
Inter-Module Output Clock Synchronization
Initiator: Let the internal rate generator produce the output sampling
clock impulses based on the Output Sample Time setting (below). The
OUTPUT CLK I/O pin is configured as output and can be used to clock
other modules. Target: Use the OUTPUT CLK I/O pin as input for clocking
the output sampling. The internal rate generator is disabled.
-
Output Sample Time (Clock Generator)
This is the interval time for the output sampling clock. The time
value is divided from the module's 40.32MHz clock and the minimum is
0.99206μs (40/40.32MHz). The clock source is the same for inputs,
outputs and the frame burst trigger, so if the Frame Time equals the
product of Frame Size and Sample Time, a perfect alignment of the frames
is guaranteed.
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
Select the active 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 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
Select the active input channels in a vector. Check the active output channels to
avoid conflicts.