Reads 4-byte real from input or holding register, depending on the
address, and returns result in value
.
The function returns the following error codes:
E_BOUNDS
if argument n
is larger than size of data
.E_INVALID
if argument address
or data
is invalid.E_MODBUS
if reading the registers failed.E_NULL
if the Modbus context is not associated.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(modbus_type), | intent(inout) | :: | modbus |
Modbus RTU/TCP type. |
||
integer, | intent(in) | :: | address |
Address to read from. |
||
real(kind=4), | intent(out) | :: | value |
Value read from register. |
||
integer, | intent(in) | :: | order |
Byte order. |