Sets the Modbus RTU serial mode to RS-232 or RS-485. This API function is only supported on Linux kernels 2.6.28 onwards.
The function returns the following error codes:
E_INVALID
if the mode is invalid.E_MODBUS
if setting the serial mode failed.E_NULL
if the Modbus context is not associated.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(modbus_rtu_type), | intent(inout) | :: | modbus |
Modbus RTU type. |
||
integer, | intent(in) | :: | mode |
Modbus RTU mode ( |