dm_modbus_read_bit Function

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

Reads single input bit from address. The function uses the Modbus function code 0x01 (read coil status).

The function returns the following error codes:

  • E_MODBUS if reading the register 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 read from.

integer(kind=i4), intent(out) :: value

Bit read.

Return Value integer


Calls

proc~~dm_modbus_read_bit~~CallsGraph proc~dm_modbus_read_bit dm_modbus_read_bit proc~dm_modbus_read_bits dm_modbus_read_bits proc~dm_modbus_read_bit->proc~dm_modbus_read_bits modbus_read_bits modbus_read_bits proc~dm_modbus_read_bits->modbus_read_bits