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

IO642 - Setup v2

IO642 - Setup v2 — Configure the IO642 I/O module

Library

Simulink Real-Time - Speedgoat

Description

The Setup block configures the protocol stack of the related I/O module and enables the send and receive blocks to exchange data on the network. Your model can contain only one Setup block for each I/O module in your target machine.

Ports

This driver block has no input or output ports.

Parameters

Tab: General
Module ID

The Module ID has two functions:

  • It logically connects 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 family is installed, the Module ID must be set to 1. To see how each I/O module maps to a Module ID, use this Speedgoat API:

    speedgoat.getIoInterfaces("TargetName", "mySpeedgoat")

This Setup block belongs to two families of I/O modules that use the same hardware for multiple protocols. Across both families, the Module ID must be unique.

  • IO64X/IO75X (single-node modules): IO641, IO642, IO643, IO644, IO750, IO751, IO752, IO753, IO754, IO755, IO756, IO758

  • IO64X-32/IO75X-32 (multi-node modules): IO642-32, IO752-32, IO754-32, IO756-32

If the PCI Slot parameter is set to -1 (auto-search), the Module ID must be in the range 1:n, where 'n' cannot be larger than the number of modules of this type installed in the target machine. Not all installed I/O modules need to be used.

To use this Setup block with a multi-node I/O module (IO75X-32 family), the Module ID must be defined as a two-element vector. The second vector element is the sub-module ID. It describes the specific node (1:32) within the I/O module. The 32 nodes are internally connected to form two linear networks (daisy-chain), where the first and the last node of both chains are externally accessible. If one node is not configured (has no Setup block), the chain terminates at this point. The sub-module IDs must therefore start at node 1, 16, 17 or 32 and not have any gaps.

[Note]Note

When using I/O modules of both families simultaneously (single-node and multi-node I/O modules), always use explicit addressing in the PCI Slot parameter. Ignore the Module IDs returned by the getIoInterfaces function and instead assign unique Module IDs accross all modules used.

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.

Tab: Profibus
Bus Start

  • Automatic: The device starts the communication immediately after the initialization of the real-time application on the target. The communication is maintained even if the real-time application stops.

  • Application controlled: After initialization of the real-time application on the target, the communication of the slave with the network is off. The device starts the communication immediately after the real-time application has been started. The device stops the communication on the network when the real-time application stops.

Bus Address

The address of the slave in the PROFIBUS network. Each slave has an unique address between 2 and 126. The value must match the address of the related slave in the network confiuration of the master.

Select address 126 if you want the master to assign a bus address while the connection is being established. In this case you must also activate the Bus Address Change parameter.

Address 0 is reserved for diagnostic tools. The Master is generally at address 1. Address 127 is used for broadcasting.

Manual Configuration

Select the checkbox if you want to configure the PROFIBUS protocol stack manually.

Deselect the checkbox if you want to configure the PROFIBUS protocol stack automatically by importing a GSD file.

Import GSD

Push the button and select a valid GSD file. All the neccessary PROFIBUS protocol stack parameters will be read out of the file and will be written to the block parameters below. You can emulate almost every existing PROFIBUS slave. Refer to the usage notes to find GSD files and learn about limitations.

Ident Number

This number is unique for each slave device type as it is uniquely assigned by the Profibus Trade Organization. You can find the value in the related GSD file: Ident_Number = 0x1234

As the value in the GSD file is in hexadecimal format, you must convert it to a numeric value: hex2dec('1234')

The valid range is: 0 to 65535 (0x0000 to 0xFFFF)

Default value: 0x0B69 (CIFX DP/DPS Hilscher GmbH)

If you type 0 the default value will be assigned.

Baud Rate

Select the transmission speed. The speed must match the speed selected in the master configuration. The values in the drop-down list are defined by the PROFIBUS standard. If you want to emulate a PROFIBUS slave of another vendor, you will find the supported baud rates in the related GSD file. For example:

9.6_supp = 0 19.2_supp = 0 45.45_supp = 1 93.75_supp = 1 187.5_supp = 1 500_supp = 1 1.5M_supp = 1 3M_supp = 1 6M_supp = 1 12M_supp = 0

However, the IO642 I/O module supports all baud rates. Select Auto Detect if you are not sure which baud rate to select. Refer to the manual of your PROFIBUS master to learn about how to set the PROFIBUS timing on the master side.

DPV1

DPV1 is an extension of the PROFIBUS standard and describes a cyclic data exchange and alarm notifications. If you select the checkbox, the PROFIBUS slave protocol stack supports DPV1. At the same time, the related GSD file tells the PROFIBUS master if a slave is a DPV1 slave. The selection in the block mask must therefore match the master configuration. You can find the DPV1 property in the GSD file (DPV1_Slave = 1) and in the master configuration. Refer to the manual of your PROFIBUS master for further information.

Deselect the Manual Configuration parameter and import the GSD file to automatically set up this parameter.

SYNC

The PROFIBUS master sends SYNC commands to a group of slaves in order to synchronize the output of those slaves. The group can be defined in the PROFIBUS master configuration tool. "Output" means the data sent from the master to the slave. The slaves only output data if they receive a SYNC request. The IO642 I/O module generally supports this feature. The output of the Receive block would then hold the latest values until the next SYNC is received.

If you select the checkbox, the PROFIBUS slave protocol stack supports SYNC. At the same time, the related GSD file tells the PROFIBUS master if a slave supports SYNC. The selection in the block mask must therefore match the master configuration. You can find the SYNC property in the GSD file (Sync_Mode_supp = 1) and in the master configuration. Refer to the manual of your PROFIBUS master to learn how to define SYNC groups and how to use SYNC commands.

Deselect the Manual Configuration parameter and import the GSD file to automatically set up this parameter.

FREEZE

The PROFIBUS master sends FREEZE commands to a group of slaves in order to synchronize the input of those slaves. The group can be defined in the PROFIBUS master configuration tool. "Input" means the data sent from the slave to the master. The slaves only send actual data if they receive a FREEZE request. The IO642 I/O module generally supports this feature. The Send block sends old data as long as no FREEZE command is received.

If you select the checkbox, the PROFIBUS slave protocol stack supports FREEZE. At the same time, the related GSD file tells the PROFIBUS master if a slave supports FREEZE. The selection in the block mask must therefore match the master configuration. You can find the FREEZE property in the GSD file (Freeze_Mode_supp = 1) and in the master configuration. Refer to the manual of your PROFIBUS master to learn how to define FREEZE groups and how to use FREEZE commands.

Deselect the Manual Configuration parameter and import the GSD file to automatically set up this parameter.

FAILSAFE

This parameter determines which data the slave expects if the master is in Clear State. In Clear State the master does not have valid data for the slave. The IO642 I/O module generally supports this feature. If the checkbox is selected the slave expects the master to send no data in cyclic data transmission. If the checkbox is deselected the slave expects the master to send data of the specified length but all the values will be 0.

The related GSD file tells the PROFIBUS master if a slave supports FAILSAFE. The selection in the block mask must therefore match the master configuration. You can find the FAILSAFE property in the GSD file (Fail_Safe = 1). Refer to the manual of your PROFIBUS master to learn more about how to handle FAILSAFE.

Deselect the Manual Configuration parameter and import the GSD file to automatically set up this parameter.

Extra Alarm SAP

With DPV1 the slave can send alarm messages to the master. The master acknowledges an alarm by sending a response to a specific Service Access Point in the slave. Usually SAP 51 handles acyclic communication and alarm acknowledgment. But some PROFIBUS slaves support alarm acknowledgment via SAP 50. The IO642 I/O module generally supports this feature as well.

If set, the slave stack expects alarm acknowledgements from the master at service access point 50. If not set, the slave stack expects alarm acknowledgements from the master at service access point 51. At the same time, the related GSD file tells the PROFIBUS master about the correct SAP. The selection in the block mask must therefore match the master configuration. You find the property in the GSD file (Extra_Alarm_SAP_supp = 1).

Deselect the Manual Configuration parameter and import the GSD file to automatically set up this parameter.

Bus Address Change

If a PROFIBUS slave has bus address 126 the PROFIBUS master can adjust the address by sending a specific command. The IO642 I/O module generally supports this feature.

If set, the slave stack accepts the request from the master and changes the bus address to the received value. If not set, the slave rejects the master request and keeps the predefined value. In this case the parameter Bus Address parameter must not be 126. At the same time the related GSD file tells the PROFIBUS master about whether the slave expects the address change. The selection in the block mask must therefore match the master configuration. You can find the property in the GSD file (Set_Slave_Add_supp = 1). Refer to the manual of your PROFIBUS master to learn more about how to handle address changes.

Deselect the Manual Configuration parameter and import the GSD file to automatically set up this parameter.