| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
SerialPort.Setup
Sets baud rate, parity and data/stop bits in one call.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| SerialPort | 16.3 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
MBS( "SerialPort.Setup"; PortReference; BaudRate { ; Parity; DataBits; StopBits } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| PortReference | The reference number of the port. You get this number from SerialPort.Open when you open the port. | $port | |
| BaudRate | The new baud rate as number. | 9600 | |
| Parity | The new parity setting. Can be 0 (off), 1 (odd) or 2 (even) |
1 | Optional |
| DataBits | The new data bits setting. Value can only be 5, 6, 7 or 8. |
8 | Optional |
| StopBits | The new stop bits setting. Can be 1 or 2 on Mac and 1, 1.5 or 2 on Windows. |
2 | Optional |
Result
Returns OK or error.
Description
Sets baud rate, parity and data/stop bits in one call.See also
- SerialPort.GetXON
- SerialPort.Open
- SerialPort.Path
- SerialPort.Read
- SerialPort.Resume
- SerialPort.SetCTS
- SerialPort.SetDTR
- SerialPort.SetRTS
- SerialPort.SetTag
- SerialPort.SetXON
Release notes
- Version 16.3
- Added SerialPort.Setup function.
This function checks for a license.
Created 11st June 2026, last changed 11st June 2026