setModbusValue v5.2.1
Set the value of a named internal Modbus register. The new value is immediately visible to the Modbus master, and increments the register's generation.
Parameter
| Key | Type | Description |
|---|---|---|
| name | string | Register name. |
| value | number|string|array | New value. The JSON type must match the register type, see Modbus. |
For a numeric register, the value must be an integer within the range of the
type. For a STRING register, the string may be at most two bytes per
register long. For a BLOCK register, the array may have at most one word per
register, and is padded with zeros to the full length.
Return value
null
The request fails if there is no register with the given name, or if the value has the wrong type or is out of range.
Examples
setModbusValue {"name": "batch", "value": 1235}
setModbusValue {"name": "status", "value": [1, 0, 65535]}