| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| R2010b Documentation → Real-Time Windows Target |
| Contents | Index |
| Learn more about Real-Time Windows Target |
| On this page… |
|---|
Typically I/O boards are preset from the factory for certain base addresses, voltage levels, and unipolar or bipolar modes of operation. Boards often include switches or jumpers that allow you to change many of these initial settings. For information about setting up and installing any I/O board, read the board manufacturer's documentation.
For an online list of all I/O boards that Real-Time Windows Target software supports, see Supported I/O Boards.
A Real-Time Windows Target model connects to a board by including an I/O driver block. This block provides an interface to the board's device driver and all board-specific settings. The device drivers included with the Real-Time Windows Target software usually provide the same flexibility of settings offered by the board manufacturer. You can enter I/O board settings by using the I/O Block Parameters dialog box; setting jumpers and switches on the board; or both. The three types of board settings are:
Software selectable — Specify the desired settings in the I/O Block Parameters dialog box. The driver writes the settings you specify to the board. Examples include A/D gain inputs and selecting unipolar or bipolar D/A outputs.
Hardware selectable and software readable — Specify the desired settings by configuring jumpers or switches on the board. The driver reads the settings you selected and displays them in the I/O Block Parameters dialog box.
Hardware selectable, but not software readable — Set jumpers or switches on the physical board, and then enter the same settings in the I/O Block Parameters dialog box. These entries must match the hardware jumpers or switches you set on the board. This type of setting is necessary when the board manufacturer does not provide a means for the I/O driver to write or read all board settings. Examples include base address, D/A gain, and differential or single-ended A/D inputs.
You can configure a Real-Time Windows Target model to use an I/O board whether or not the board exists in the computer, but you will not be able to run the model until the board is installed with any jumpers or switches correctly set. Details of installation and configuration depend on the data transfer direction and the specific board, but are essentially similar in all cases. Details for various types of boards and drivers appear later in this chapter.
The following instructions use the Humusoft® AD512 I/O board as an example, configure the board for analog input, and assume that you have physically configured and installed the board in your computer before you add its driver to your model. Customize the steps to provide the results that you need.
To install and configure an I/O board and its driver,
Install the board in the computer, setting any jumpers or switches as needed.
In the model window, choose View > Library Browser to display the Simulink Library Browser.
Clone an appropriate Input or Output driver block to your model from the Real-Time Windows Target library.
Double-click the cloned I/O driver block.
The I/O Block Parameters dialog box opens. For an Analog Input block, the dialog box initially looks like this:

Click Install new board. From the list that appears, point to a manufacturer, then select a board type. For example, point to Humusoft, then click AD512:

The I/O board dialog box opens. The name of this dialog box depends on which I/O board you selected. The box for the Humusoft AD512 board looks like this:

Select one of the following, as appropriate to the board:
For an ISA bus board, enter a hexadecimal base address. This value must match the base address jumpers or switches set on the physical board. For example, to enter a base address of 0x300, in the Address box type
300
You can also select the base address by checking boxes A9 through A3.
For a PCI bus board, enter the PCI slot or check Auto-detect.
The I/O Block Parameters dialog also lets you set other I/O block parameters, such as the sample time. Set such parameters as needed.
The Real-Time Windows Target kernel tries to connect to the selected board, and if successful, displays the following message.

Click OK on the message box, and again on the I/O Block Parameters dialog box.
The I/O Block Parameters dialog box closes, and the parameter values are included in your Simulink model.
When multiple boards of identical type exist, you must execute the complete installation sequence for each board, just as you would if the boards were of different types. Thus two identical PCI boards would result in two entries in the drop-down list of installed boards. The entries would differ only in the PCI slot number shown for each board.
Autodetecting Multiple Boards. The Autodetect feature cannot be used to locate multiple boards of the same type. You must specify their PCI slot numbers manually.
Once you have used the I/O Block Parameters dialog box to add a board and configure its driver, you can add additional I/O driver blocks that connect to the same board from other locations in the model. To accomplish this, clone the appropriate driver block, open its I/O Block Parameters dialog box, and choose the board from the list of installed boards.
Scope of Driver Block Parameters. All I/O driver blocks that use a given board share identical parameters. You need to specify these parameters only once, when you first add the board and configure its driver. If you subsequently change a parameter in any driver block connected to a board, the same change occurs in all the other driver blocks connected to that board.
Most ISA bus I/O boards are preset with a base address of 0x300. If you are using multiple I/O boards or other boards (for example, network cards) that already use the address 0x300, you must set your board with another base address.
In the I/O board dialog box, enter the same base address that you set on the physical board. You open the I/O board dialog box from any I/O driver Block Parameters dialog box.
You do not have to set a base address with a PCI board. The plug-and-play feature of the Windows operating system assigns a PCI slot number. You can enter the slot number in the I/O board dialog box, or you can let the driver determine the slot number for you. You open the I/O board dialog box from any I/O driver Block Parameters dialog box.
We recommend that before you use a PCI or PCMCIA board, you install the drivers supplied by the board manufacturer. The Real-Time Windows Target software does not use these manufacturer-supplied drivers. However, they sometimes initiate the plug-and-play recognition of the board. Without these drivers installed, the board might be invisible to your computer and to the Real-Time Windows Target software.
Real-Time Windows Target applications cannot use Windows DLLs and kernel-mode drivers, which are not suitable for real-time operation. The device drivers supported by the Real-Time Windows Target software are listed at Supported I/O Boards. If no driver is listed for the board that you want to use, you may be able to write a custom device driver.
A user-written custom device driver must program the board directly at the register level. All supported Real-Time Windows Target drivers use this technique. The Real-Time Windows Target software supports I/O mapped board registers for custom device drivers. The Real-Time Windows Target software does not support memory-mapped board registers for custom device drivers.
If you want to use an unsupported board that you believe should be supported, contact MathWorks Technical Support.
Most PC/104 bus I/O boards are preset with a base address of 0x300. If you are using multiple I/O boards or other boards (for example, network cards) that already use the address 0x300, you must set your board with another base address.
In the I/O board dialog box, enter the same base address that you set on the physical board. You open the I/O board dialog box from any I/O driver Block Parameters dialog box.
Using a compact PCI board requires that you use a compact PC (industrial PC). In addition, you need to install the Windows operating system, the MATLAB environment, Simulink software, and Real-Time Windows Target software on the compact PC.
The plug-and-play feature of the Windows operating system assigns a base address automatically. You can enter this address in the I/O board dialog box, or you can let the driver determine the address for you. You open the I/O board dialog box from any I/O driver Block Parameters dialog box.
We recommend that before you use a PCI or PCMCIA board, you install the drivers supplied by the board manufacturer. Real-Time Windows Target software does not use these manufacturer-supplied drivers. However, they sometimes initiate the plug-and-play recognition of the board. Without these drivers installed, the board might be invisible to your computer and to the Real-Time Windows Target software.
![]() | Introduction | Using I/O Driver Blocks | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |