Main Content

Ethernet Send

Send Ethernet packets from Simulink Real-Time target computer

  • Library:
  • Simulink Real-Time / IP / Ethernet

  • Ethernet Send block

Description

The Ethernet Send block enables you to send an Ethernet packet that you construct by using Simulink® blocks or a MATLAB® Function block and connects this signal to the Data inport. This input is fully customizable. The block sends the packet to the Ethernet interface (device) that you select on the target computer.

Ports

Input

expand all

Connect the constructed Ethernet packet signal from the model to this inport. If you enable the Enable Simulink messages parameter, the data type is Ethernet_Packet. Use the slrealtime.createEthernetPacketBusObj function to create the Simulink.Bus type Ethernet_Packet. This data type consists of:

  • Data: DataType: uint8, Complexity: real, Dimensions: [64 1]

  • Length: DataType: uint8, Complexity: real, Dimensions: 1

Data Types: uint8 | Ethernet_Packet

This port is available when you disable the Enable Simulink messages parameter. The Length determines the number of bytes of data to transmit. Specify the width of the Data vector as the maximum number of bytes that you expect to transmit.

Data Types: double

Parameters

expand all

The Interface Name is the name of the target computer Ethernet interface. Use the Speedgoat Ethernet Configuration Tool to identify the Ethernet index (interface) on the target computer.

Programmatic Use

Block Parameter: InterfaceName

If enabled, the source MAC address in the sent packets is overwritten by the MAC address from the Data port. If disabled (default), the source MAC address in the sent packets is the actual MAC address of the target computer.

Programmatic Use

Block Parameter: OverwriteSrcMACAddress

The Enable Simulink messages directs the block to treat data as messages. When enabled, the Length port is removed.

Programmatic Use

Block Parameter: MessageIn

Enter the base sample time or a multiple of the base sample time. -1 means that sample time is inherited.

Programmatic Use

Block Parameter: SampleTime

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2022a