Main Content

Ethernet Send

Send Ethernet packets from target computer

Since R2022a

  • Ethernet Send block

Libraries:
Simulink Real-Time / IP / Ethernet

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 Speedgoat® target computer.

Examples

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 (on), the block sends the packet with the actual MAC address of the target computer, overwriting the MAC address set by the user. If disabled (off), the block sends the packet with the MAC address specified in the packet constructed by the user.

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