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

IO751 - Record Read

IO751 - Record Read — Reads records of remote PROFINET devices.

Library

Simulink® Real-Time™ - Speedgoat

Description

This block is used to read records of remote PROFINET devices. Use one block for each record you want to read.

Reading and writing of records is performed acyclically. Device response times vary. Record read and write commands are executed one after another. The more Record blocks you place in your model the longer you will wait for responses from connected devices.

Ports

Inputs
Enable

The block sends out read requests as long as the input port is TRUE.

Best practice is to set the block's sample time to a higher rate (like 1 ms) and trigger the Enable input port at a lower rate. This ensures low network traffic but immediate updates of the output ports once a response is received.

Data type: boolean

Outputs
Data

Outputs the current value of the requested record. The port inherits the data type and the dimensions from the Init Value parameter. The data type and dimensions do not both need to match the data type and dimensions of the record in the remote slave device, but the overall number of bytes must be equal to or greater than the size of the record. The block outputs the number of bytes received (padded by zeros), or truncates the data if it exceeds the port size. The Length output port outputs the actual number of bytes received.

Data type: Fundamental data types from boolean to double are supported as well as dimensions from scalar values to vectors.

Status

A rising or falling edge indicates a completed read operation. Either a response was received and the Data output port was updated or the Error output port provides an error code.

If the Status output does not change, the read operation is still in progress or the block is idle.

Data type: uint32

Error

Outputs the error code reported by the driver, the protocol stack, or the remote device (the error included in the response).

Data type: uint32

  • Driver

    CodeDescription
    1The quantity of data included in the read response exceeds the dimensions of the data output port
    2Received a read response, but a write response was expected (and vice versa)
    7Waiting for response timed out
  • Protocol Stack

    Please refer to the Status Codes for Protocols Supported with the IO64x/IO75x Modules.

  • Remote Device

    Please refer to the chapter about PROFINET status codes in the IO751 Usage Notes for further information.

Length

Outputs the number of data bytes received. The value will always be less than or equal to the size of the Data output port.

Data type: uint32

Parameters

Module ID

This ID defines the link to the corresponding Setup block

Device Index

The index of the remote PROFINET device. Find the index in the SYCON.net project. In SYCON.net, double-click the controller node. In the navigation area, click Device Table. In the table on the right, navigate to the device whose record you want to read and locate the device index in the Index column.

API

The API of the module to which the record belongs. Valid values are between 0 and 0xFFFFFFFF.

Slot

The slot of the module to which the record belongs. Valid values are between 0 and 0xFFFF.

Sub-Slot

The subslot of the submodule to which the record belongs. Valid values are between 0 and 0xFFFF.

Index

Enter the index of the record within the respective subslot. Corresponds to the XML attribute Index of the related ParameterRecordDataItem in the GSDML file. Valid values are between 0 and 0xFFFF

Init Value

The value that the Data port outputs before a read response is received. The parameter's data type and dimensions define the data type and dimensions of the Data output port and specify the length of the requested data. Fundamental data types from boolean to double are supported as well as 1D-arrays.

The Init Value corresponds to the XML attribute Data of the related ParameterRecordDataItem in the GSDML file.

Timeout

The time the module should wait for a response from the remote device before allowing the next Record block to send out its request.

Extended Interface

If selected, the block shows the Status, the Error and the Length output ports. Otherwise, the ports are hidden.

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.

[Caution]Caution

All blocks that interface with the same I/O module must have identical sample times.