ModbusPortConfig
Configure the RS485 port Modbus/RTU settings
Description
ModbusPortConfig( speed, settings )
This command will configure the RS485 port.
Parameters
speed | Desired bit rate (1200 - 115200 bps) |
settings | Bitmap combination of UART_WLEN_*, UART_STOP_* and UART_PAR_* |
Settings
UART_WLEN_8 | 8 data bits |
UART_WLEN_7 | 7 data bits |
UART_STOP_ONE | Transmit one stop bit (receiving will always accept one or two stopbits) |
UART_STOP_TWO | Transmit two stop bits (receiving will always accept one or two stopbits) |
UART_PAR_NONE | No parity bit |
UART_PAR_EVEN | Even parity |
UART_PAR_ODD | Odd parity |
Return value
No return value.
Example usage
ModbusPortConfig( 19200, UART_WLEN_8 | UART_STOP_ONE | UART_PAR_NONE );