dm_modbus_write_register Function

public function dm_modbus_write_register(modbus, address, register) result(rc)

Writes register to address. The function uses the Modbus function code 0x06 (preset single register).

The function returns the following error codes:

  • E_MODBUS if writing the registers failed.
  • E_NULL if the Modbus context is not associated.

Arguments

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

Modbus RTU/TCP type.

integer, intent(in) :: address

Address to write to.

integer(kind=u2), intent(in) :: register

Register value (unsigned).

Return Value integer


Calls

proc~~dm_modbus_write_register~~CallsGraph proc~dm_modbus_write_register dm_modbus_write_register modbus_write_register modbus_write_register proc~dm_modbus_write_register->modbus_write_register