Project

General

Profile

Wireless Communication Block (HIL)

How this block appears in a Simulink model?

appearance.PNG

What can be configured?

Configuration Parameter Selectable Option/Value Description
Protocol UDP UDP protocol will be used to transmit messages.
Mode Receive--Transmit--Receive/Transmit Select the mode in which the block should act as.
Host IP address (IPV4) Any IP
Host port number Enter the port number of the host.
Receive buffer size 16--32--64--128--256 Select the buffer size of the receiver.
Sample time (sec) -1 (inherited) or specify Specify the sample time.

When to use this block?

This block is used to send/receive messages wirelessly between an ESP32 and a host computer over UDP protocol.

How does this block work?

Mode [Receive]: When configured in this mode, the block will wait for Host PC data packet at port [X], when the data packet is received this is shown in the output message port. The status port is 0 initially and becomes 1 when the socket is configured properly. Each time a data packet is received the status port will then increment by 1 up to maximum of 255 and then starting back from 2.

Mode [Transmit]: When configured in this mode, the block will send input message to port [X]. Transmission rate controlled by trigger rising edge. The status port is 0 initially and becomes 1 when the socket is configured properly. Each time a data packet is sent the status port will then increment by 1 up to maximum of 255 and then starting back from 2.

Mode [Receive/Transmit] : When configured in this mode, the block will wait for Host PC data packet at port [X], when the data packet is received this is shown in the output message port and the block will transmit the input message to the same Host IP address at port [X+1].
The status port is 0 initially and becomes 1 when the socket is configured properly. Each time a data packet is received the status port will then increment by 1 up to maximum of 255 and then starting back from 2.

Demo

To check the functionality of the block check I2C Demo.

Previous : HTTP Block
Next : SD Card Setup Block

Also available in: PDF HTML TXT