blockSerialPortSend
A block for sending 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 sending datagrams over a serial port
Example
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Activation | |||
| Boolean | enableExternalTrigger (from PartialSampleTrigger) | false | true, enable external trigger input signal, otherwise use sample time settings below |
| SI.Period | sampleTime (from PartialSampleTrigger) | 0.1 | Sample period of component |
| SI.Time | startTime (from PartialSampleTrigger) | 0 | First sample time instant |
| Outgoing data | |||
| Boolean | autoBufferSize | true | true, buffer size is deduced automatically, otherwise set it manually. |
| Integer | userBufferSize | 16*64 | Buffer size of message data in bytes (if not deduced automatically). |
| String | Serial_Port | "/dev/ttyPS0" | SerialPort to send data |
| SerialBaudRate | baud | SerialBaudRate.B9600 | Serial port baud rate |
| Integer | parity | 0 | set parity (0 - no parity, 1 - even, 2 - odd) |
| Integer | byteSize | 8 | Number of data bits transmitted per (serial data format) byte (8 is most common) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.BooleanInput | trigger (from PartialSampleTrigger) | ||
| Interfaces.PackageIn | pkgIn |