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

IO107 - Analog output (DMA)

IO107 - Analog output (DMA) — Writes the IO107 analog outputs (DMA)

Library

Simulink Real-Time - Speedgoat

Description

This driver block can be used to output frame-based data. A Setup block is not required when using the DMA output block.

This I/O module has 2 function modes:

  • Synchronized with the IO109 I/O module: the module must be externally clocked by the IO109 I/O module and the model must be driven by the IO109 I/O module interrupt.

  • Asynchronous data output (replay function): frame-based data is/are replayed to the output. No external clocking needed. The model must be driven by the IO107 I/O module interrupt (select IO108 DMA INT in the Configuration Parameters).

In DMA mode, the model must contain an Interrupt Setup block that triggers a subsystem or the model. Refer to the block documentation for more information.

[Note]Note

For MATLAB releases prior to R2020b, please refer to the interrupt settings described in the MathWorks web documentation.

Ports

This block has one input port per output channel. The width of the input is equal to the frame size and each element of this vector is one sample.

Inputs
X (X is the analog channel number)

The value to be output from analog channel X in volts.

Data Type: double

Parameters

All the configuration settings of the IO107 I/O module in DMA mode can be found in the two tabs of the DMA output parameter dialog.

Main Tab
Module ID (IO107/IO108)

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

The IO107 I/O module uses the same module identifiers as the IO108 I/O module. If your target machine contains both of these modules, assign different values to each of them.

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
Auto-Calibration at Download

The auto-calibration is enabled by default to obtain maximum measurement accuracy. The auto-calibration function compensates for component aging, and minimizes the effects of temperature on accuracy. The calibration normally takes approximately two seconds, so we recommend increasing the host-target communication time-out in the model configuration parameters by the same amount of time. The calibration is not re-executed during normal start/stop operation once the target application has been downloaded.

Warning: During the calibration process various signals may be present at the output pins. These signals will not exceed the configured voltage range.

Enable Remote Ground-Sensing

Enable remote ground-sensing to compensate for a ground potential difference in single-ended mode between the ground connection at the load and the output return pin. "REM GND SENSE" must be connected to the remote system ground.

Synchronization Mode

Set the working mode of the I/O module. Select "Sync to IO109 (external clock source)" to synchronize the module with the IO109 I/O module analog input (for example, for a Simulink Real-Time audio system model) or select "Async (replay function)" to replay data to the output without any external I/O module.

External Sync Signal Type

Select either LVDS or TTL mode for the sync I/Os. In TTL mode, use only the (+) pins. In addition, the (-) pins should be grounded to digital return.

Frame Size, Sample Rate and Block Sample Time

Parameter dependency is as follows: frame size = block sample time × sample rate. By defining two parameters, an equation will determine the third parameter automatically, provided the parameter value for the third parameter is set to -1.

For example: We select a frame size of 32 and a sample rate of 44,100 Hz and specify the block sample time as -1. The block sample time is automatically computed to be 725.6 µs. In other words, this model would execute every 725.6 µs, which is every 32 samples at 44.1 kHz.

Frame Size

The number of samples per frame. An interrupt occurs each time the I/O module acquires a frame. In Async (replay function) mode, the minimum frame size is 5. Refer to the "Frame Size, Sample Rate and Block Sample Time" section for more information.

Sample Rate

The frequency at which the samples are taken. This parameter is in Hertz, and must be between 172 and 450,000 Hz (172 Hz to 450 kHz). Refer to the "Frame Size, Sample Rate and Block Sample Time" section for more information.

Block Sample Time

The time between frame completions. Note: The block sample time can only be a multiple of 1/sample rate. Refer to the "Frame Size, Sample Rate and Block Sample Time" section for more information.

Analog Output Tab
Active Channels

Select the active output channels in a vector. The IO107 I/O module supports 16 channels. The order inside the vector defines the input port order of the Analog output block.

Examples:

  • Change order: "[2 1 4 3]"

  • Simply use all the channels in ascending order: "1:8"

  • Only use channels 2 and 3: "[2 3]"

Output Range

The voltage range for all analog output channels. This driver does not allow different ranges for individual channels. The following voltage ranges are available: ±1.25 V, ±2.5 V, ±5 V, ±10 V

Initial Values

This parameter is only available in Async mode.

Define the initial voltage level on the analog outputs after the model is downloaded and after the model is stopped. The voltages can be set individually by entering a vector which maps to the active channels' vector. A scalar value applies to all active channels.

Examples:

  • Use individual values: "[-1 -1.5 0 2.5]"

  • Set all channels to 0 V: "0"