Skip to main content

Customer Login

This content is for Speedgoat customer only. Log in to see content.

Forgot your password?

Don't have a Speedgoat account? Create an account.

Documentation
CONTENTS
https://www.speedgoat.com/help/slrt/page/icon_documentation.jpg

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: autosearch)

There are two approaches for mapping the blocks to a specific I/O module installed in the target machine. All modules of the same kind must be configured using the same method.

  • Auto-Search: the default value -1 allows the real-time target machine to auto-search for the I/O module. The priority is defined by the module ID (first vector element for a multinode). The module with the lowest PCI bus/slot number is assigned to module ID 1 (or [1 x]) and the next module found is assigned to module ID 2 (or [2 x]), and so on

  • Explicit Addressing: the location of the module inside the target machine can be explicitly defined by using the [BusNumber, SlotNumber] format. To determine the bus number and the PCI slot number, run the following command in the MATLAB command window:

    speedgoat.showInstalledIoModules
Module ID

A unique module ID must be used for each type of I/O module Setup block in your model.

The module ID has two functions:

  • It defines the logical connection to link the I/O module driver blocks with each other

  • It also has an impact on the PCI slot auto-search feature: if only one I/O module is installed, the module ID must be set to 1. If multiple modules are installed, it must be in the range 1:n. Not all the I/O modules installed in the target machine need be used

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, so we recommend increasing the host-target communication time-out in the model configuration parameters to allow for this. 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.

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. (see picture below this table)

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