dm_modbus_write_bit Function

public function dm_modbus_write_bit(modbus, address, value) result(rc)

Writes bit value to address using Modbus function code 0x05(force single coil).

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, intent(in) :: value

Value to write (0 or 1).

Return Value integer


Calls

proc~~dm_modbus_write_bit~~CallsGraph proc~dm_modbus_write_bit dm_modbus_write_bit modbus_write_bit modbus_write_bit proc~dm_modbus_write_bit->modbus_write_bit