You are here: Start » Filter Reference » System » Serial Port » SerialPort_WriteString
Module: | FoundationLite |
---|
Writes string characters to serial port.
Name | Type | Range | Description | |
---|---|---|---|---|
![]() |
inPortId | Integer | 0 - 7 | Identifies open port instance when working with multiple serial ports |
![]() |
inString | String | ||
![]() |
inASCIIMode | Bool | ||
![]() |
inTerminator | IntegerArray |
Examples
Filter writes inString characters to output buffer. By default string is send using UTF8 encoding (multi-byte).
When inASCIIMode is enabled filter will send only ASCII characters. Any attempt of sending non-ASCII character will result in domain error.
Remarks
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
Using filters writing to serial port without previous configuration will cause "SerialPort not initialized" error.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | SerialPort_WriteString can send only ASCII characters when inASCIIMode is selected. When option inASCIIMode is enabled, filter can send only an ASCII characters. Please check ASCII table codes for more informations. |
Complexity Level
This filter is available on Basic Complexity Level.
Filter Group
This filter is member of SerialPort_Write filter group.
See Also
- SerialPort_Config – Configures the serial port.
- SerialPort_WriteBuffer – Writes raw binary data from a byte buffer to serial port.
- SerialPort_WriteChar – Write single ASCII character to device.
- SerialPort_WriteByte – Writes one character in binary mode to serial port.