modelTCPCommunicatorExample

Example model to show TCP communication with simple server

Extends from BaseClasses.PartialTCPCommunicator.

Information

Simple TCP Communicator Example

This is a small example block which allows to establish a TCP connection between a client (i.e., Dymola or SimulationX by ESI) and an external server. It sends the value of input u[1] as a floating-point number to the server and receives a floating-point number. Check SocketCommunication.Examples.ExampleClientLoop for an executable example.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TimesamplePeriodExample1Sample period how often a telegram is send
Modelica.Units.SI.TimestartTimeExample0Start time when sampling starts
StringIP_AddressExample"127.0.0.1"IP address or name of Server
IntegerportExample27015Port on server
IntegernSend1Number of data points to be written
IntegernRecv1Number of data points to be read
Modelica_DeviceDrivers.Utilities.Types.ByteOrderbyteOrderModelica_DeviceDrivers.Utilities.Types.ByteOrder.LEByte order

Revisions

  • August 25, 2018  by Thomas Beutlich:
    Utilize TCPIPSocketClient_ functions from Modelica_DeviceDrivers library. This is for:#277
  • June 01, 2013  by Georg Ferdinand Schneider:
    Implemented
  • September 03, 2013  by Georg Ferdinand Schneider:
    Revised and updated