Writes 2-byte unsigned integer to address
. The unsigned value must
be passed in a 4-byte signed integer.
The function returns the following error codes:
E_MODBUS
if writing 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 write to. |
||
integer(kind=i4), | intent(in) | :: | value |
Value to write. |