dm_modbus_set_serial_mode Function

public function dm_modbus_set_serial_mode(modbus, mode) result(rc)

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.

Arguments

Type IntentOptional Attributes Name
type(modbus_rtu_type), intent(inout) :: modbus

Modbus RTU type.

integer, intent(in) :: mode

Modbus RTU mode (MODBUS_RTU_RS232, MODBUS_RTU_RS485).

Return Value integer


Calls

proc~~dm_modbus_set_serial_mode~~CallsGraph proc~dm_modbus_set_serial_mode dm_modbus_set_serial_mode modbus_rtu_set_serial_mode modbus_rtu_set_serial_mode proc~dm_modbus_set_serial_mode->modbus_rtu_set_serial_mode