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

IO644 - PDO

IO644 - PDO — Configures a process data object the IO644 sends or receives

Library

Simulink Real-Time - Speedgoat

Description

This block defines a PDO (Process Data Object). You add a block for each PDO you want to define. The CANopen PDO protocol ensures deterministic data transfer. A PDO is an 8-byte long data container, carrying data that corresponds to the specific objects of a slave's object dictionary. For that purpose, each PDO has a configurable PDO mapping.

  • RxPDOs are sent from the master to the slave. The slave protocol stack copies the data received to the corresponding objects, according to the PDO mapping.

  • TxPDOs are sent from the slave to the master. The slave protocol stack collects the data from specific objects according to the PDO mapping and sends the data to the master.

The slave has a default PDO mapping, which is specified in the slave's EDS file. In specific network states, the master can change the mapping via the SDO protocol, as the PDO configuration is also represented by objects in the dictionary of the slave. Each PDO has a configuration object and a mapping object.

  • The first RxPDO's configuration object is 0x1400; the second is at 0x1401 and so on. The actual attributes, like the transmission type, are defined as sub-objects. The first TxPDO's configuration object is 0x1800.

  • The first RxPDO's mapping object is 0x1600; the second is at 0x1601 and so on. One mapping object defines the content of one PDO. The mapped items are defined as sub-objects. Each sub-object links to an application object. The first TxPDO's configuration object is 0x1A00.

Ports

This driver block has no input or output ports.

Parameters

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.

PDO Type

Defines the direction of the PDO.

  • Rx: The module receives the PDO from the remote master

  • Tx: The module sends the PDO to the remote master

PDO ID

The module identifier in the range 1 to 255. It must start at 1 and be continuous. To define three RxPDOs and two TxPDOs, for example, place five PDO blocks in the model. Three blocks with PDO Type Rx and PDO ID 1, 2, 3. Two blocks with PDO Type Tx and PDO ID 1, 2.

Data Type: numeric scalar

CAN ID

Each PDO frame has a unique 11-bit CAN identifier. This identifier ranges from 385 to 1408 according to the formulas listed below which work for a maximum of 127 devices with no more than 4 RxPDOs and 4 TxPDOs per device. For additional PDOs, CAN identifiers belonging to other (non-existing) devices must be applied.

  • For RxPDOs:

    CAN ID = 0x080 + PDO ID * 0x100 + Node ID
  • For TxPDOs:

    CAN ID = 0x100 + PDO ID * 0x100 + Node ID

Examples:

  • The first RxPDO of the device with Node ID 1 has CAN ID 385

  • The fourth TxPDO of the device with Node ID 127 has CAN ID 1407

A parameter value of 0 prompts the PDO block to internally calculate the CAN ID using the formula described. The required node ID is inherited from the CAN Node ID parameter of the corresponding Setup block. If your device has more than 4 RxPDOs or 4 TxPDOs, you must find unused CAN IDs in your specific network and directly assign them to your additional PDOs. These CAN IDs can originate from inside or outside the reserved range for PDOs. Refer to the Communication Object Identifier section in the IO644 usage notes to learn more about CAN ID ranges. In the object dictionary, the CAN ID is part of the COB ID, which is represented by the first sub-object of a PDO's configuration object (for example object 0x1800 sub-object 0x01).

Data Type: numeric scalar

Mapping

This parameter defines the objects whose value should be included in the PDO's payload. The parameter is an n-by-2 matrix with up to eight rows representing eight data items. The first column defines the object's index, and the second column defines the object's sub-index. Only objects of type VAR can be mapped. The maximum length of a PDO payload is 8 bytes. As a result, you can map eight objects of type uint8, four objects of type int16, two objects of type single or one object of type double. You can mix data types as long as their overall length does not exceed 8 bytes.

Example: [0x6040, 0x00; 0x6155, 0x03]

Data Type: numeric matrix

Transmission Type

Defines the timing for the PDO transmission.

TypeType Number*Description
synchronous acyclic0The Transmission is triggered when the node receives the SYNC event AND one of the data items in the PDO has changed since the previous transmission.
synchronous cyclic1-240The Transmission is triggered when the node receives the SYNC event. You can reduce the frequency of the transmission with the Transmission Rate parameter. A transmission rate of 1 results in a Transmission Type of 1. A transmission rate of 240 results in a Transmission Type of 240.
synchronous RTR-only252The transmission is triggered with the next SYNC event if an RTR telegram (Remote Transmission Request) has been received.
asynchronous RTR-only253The transmission is triggered when an RTR telegram has been received.
event-driven manufacturer specific254The transmission is triggered when one of the data items in the PDO changes.
event-driven profile specific255Same as event-driven manufacturer specific

* Defined by the CANopen standard. The block writes the resulting number into the object dictionary and the EDS file. The transmission type is represented by the second sub-object of a PDO's configuration object (object 0x1800 sub-object 0x02, for example).

Transmission Rate

This parameter defines the transmission rate for synchronous cyclic mode. A transmission rate of 1 means that the PDO will be transferred with each SYNC event. A transmission rate of n means the PDO will be transferred with each n-th SYNC event. The value must be between 1 and 240. SYNC is a message the master node sends out cyclically. Its cycle time is configured in the master configuration tool.

Data Type: numeric scalar

Inhibit Time

Defines the minimum waiting time between the transmission of two identical messages. This prevents the same message (same data) from being transmitted too frequently. The unit is a multiple of 100 µs. The value must be between 0 and 65535. 65535 equals 6553500 µs.

Data Type: numeric scalar

Event Timer

Applies to event-driven transmission modes and forces the transmission within the specified time, even though the data has not changed (the event has not occurred). The unit is ms. The value must be between 0 and 65535.

Data Type: numeric scalar