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

IO99X - Battery simulation

IO99X - Battery simulation — Controls the IO99X batteries

Library

Simulink Real-Time - Speedgoat

Description

The driver block used for configuring the driver is described in the following sections.

Ports

Inputs
V n (n is the voltage channel number)

The requested output voltage value for channel n (0 to 7V, settable with 14-bit resolution. Approximately 0.43mV per step)

I n (n is the current channel number)

The requested current sink value for channel n (settable in 16 steps). Possible current steps are (mA):

  • IO991: [0, 6, 13, 19, 25, 31, 38, 44, 50, 56, 63, 69, 75, 81, 88, 94, 100]

  • IO992: [0, 18.75, 37.5, 56.25, 75, 93.75, 112.5, 131.25, 150, 168.75, 187.5, 206.25, 225, 243.75, 262.5, 281.25, 300]

[Note]Note

The driver rounds the input current sink value to the next allowed step, according to the values specified above.

Enable n (n is the enable channel number)

Controls the state of channel n (enabled / disabled). The enable ports are only shown when the Show enable ports option is enabled.

The output ports are only shown when the option "Show output ports" is enabled.

Outputs
V n (n is the voltage channel number)

IO991: The voltage value currently set by the module for channel n. This corresponds to the value read back from the module. It is not a measured value.

IO992: The measured voltage at the outputs for channel n.

I n (n is the current channel number)

IO991: The current sink value at present set by the module for channel n. This corresponds to the value read back from the module. It is not a measured value. Refer to the Inputs section for the current values permitted.

IO992: The measured current at the outputs for channel n.

Enable n

The actual state (enabled / disabled) of channel n.

Interlock

The actual state of the global hardware enable.

Parameters

IO99x module ID

If your target machine only contains one I/O module, leave the default value (1). If more than one I/O module of this type is present, select a unique number (1-255) for each of your modules.

IO99x module type

Select the specific type of I/O module this driver block is being used with.

Channel vector

This parameter allows the enabling of individual channels in any order. The order inside the vector defines the port order of the block, e.g. "[2 5 1]" or simply "1:6".

Initial channel enable values

Define the initial channel state after the model is downloaded. The state can be set individually for each channel by entering a vector. The value at a certain position in the Initial values vector is applied to the channel defined at the same position in the Active Channel vector. A scalar value applies to all channels. Examples: individual values: "[1 0 0 1]", all channels enabled: "1". "0" means channel disabled, "1" means channel enabled.

Reset channel enable values

Define if the Initial values shall also be applied after the model is stopped. '1' means "use Initial Value" and '0' means "keep the latest value". Examples: "[1 0 0 1]" or "0"

Initial output voltage values

Define the initial voltage levels (in Volt) present on the outputs after the model is downloaded. The voltages can be set individually for each channel by entering a vector. The value at a certain position in the Initial voltage values vector is applied to the channel defined at the same position in the Active Channels vector. A scalar value applies to all channels. Examples: individual values: "[1 1.5 0 2.5]", all channels to 0 V: "0"

Reset output voltage values

Define if the Initial voltage values shall also be applied after the model is stopped. '1' means "use Initial Value" and '0' means "keep the latest value". Examples: "[1 0 0 1]" or "0"

Initial current sink values

Define the initial current sink levels (in milliampere) present on the outputs after the model is downloaded. The current can be set individually for each channel by entering a vector. The value at a certain position in the Initial current values vector is applied to the channel defined at the same position in the Active Channels vector. A scalar value applies to all channels. Examples: individual values: "[ 12.5 0 100 ]", all channels to 0 mA: "0"

Reset current values

Define if the Initial current values shall also be applied after the model is stopped. '1' means "use Initial Value" and '0' means "keep the latest value". Examples: "[1 0 0 1]" or "0"

Number of Samples (IO992 only)

Select the number of samples for averaging the measured values.

Conversion Time Voltage (IO992 only)

Select the conversion time for each sample for voltage measurements.

Conversion Time Current (IO992 only)

Select the conversion time for each sample for current measurements.

Show input enable ports

Enable or disable the enable ports.

Show output ports

Enable or disable the voltage/current output ports.

Sample Time

Defines the base sample time at which this driver block gets its sample hit. This parameter can also be set to -1 for inherited sample time. The units are in seconds.

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.