blockSerialPortReceive

A block for receiving serial datagrams using the serial interface

Extends from Modelica_DeviceDrivers.Utilities.Icons.SerialPortIcon (Base icon for serial port communication blocks), Modelica_DeviceDrivers.Blocks.Communication.Internal.PartialSampleTrigger (Common code for triggering calls to external I/O devices).

Information

Support for receiving datagrams over a serial port

Example

See TestSerialPackager_SerialPort.

Parameters

TypeNameDefaultDescription
Activation
BooleanenableExternalTrigger (from PartialSampleTrigger)falsetrue, enable external trigger input signal, otherwise use sample time settings below
SI.PeriodsampleTime (from PartialSampleTrigger)0.1Sample period of component
SI.TimestartTime (from PartialSampleTrigger)0First sample time instant
Incoming data
BooleanautoBufferSizetruetrue, buffer size is deduced automatically, otherwise set it manually
IntegeruserBufferSize16*64Buffer size of message data in bytes (if not deduced automatically)
StringSerial_Port"/dev/ttyPS1"Serial port to receive data from
SerialBaudRatebaudSerialBaudRate.B9600Serial port baud rate
Outgoing data
Integerparity0set parity (0 - no parity, 1 - even, 2 - odd)
IntegerbyteSize8Number of data bits transmitted per (serial data format) byte (8 is most common)

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanInputtrigger (from PartialSampleTrigger)
Interfaces.PackageOutpkgOut