dm_modbus_get_serial_mode Function

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

Gets the current Modbus RTU serial mode (RS-232 or RS-485).

The function returns the following error codes:

  • E_INVALID if the Modbus mode is not RTU.
  • E_MODBUS if getting the serial mode failed.
  • E_NULL if the Modbus context is not associated.

Arguments

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

Modbus type.

integer, intent(out) :: mode

Modbus RTU mode (MODBUS_RTU_RS232, MODBUS_RTU_RS485).

Return Value integer


Calls

proc~~dm_modbus_get_serial_mode~~CallsGraph proc~dm_modbus_get_serial_mode dm_modbus_get_serial_mode modbus_rtu_get_serial_mode modbus_rtu_get_serial_mode proc~dm_modbus_get_serial_mode->modbus_rtu_get_serial_mode