write()#
- ModbusDevice.write( ) Command[source]#
Write
valueto the register namedalias.valueis in physical units when ascaleis configured. For coils, passTrue/False. For registers with awrite_value_map, pass the string key to look up the mapped value.- Raises:
TypeError – Value type does not match the register’s data type.
KeyError – String value not found in
write_value_map.ValueError – Read-only register, value violates
write_min/write_max, or scaled raw is out of range for the data type.