Write data with register

 1'''
 2Modbus_slave - write_data_with_register.py.
 3
 4This example demonstrates how to write data into slave
 5
 6The range of input registers is from 41000 to 41499.
 7
 8For other examples please check:
 9    https://github.com/WPC-Systems-Ltd/WPC_Stand-alone_Python_release/tree/main/examples
10
11Copyright (c) 2024 WPC Systems Ltd.
12All rights reserved.
13'''
14
15## WPC
16import pywpc
17
18## Open Modbus slave in background
19pywpc.ModbusSlave_open()
20
21## Write int value in Modbus slave's map
22pywpc.ModbusSlave_inputRegisterWriteInt(41000, 5566)
23
24## Write float value in Modbus slave's map
25pywpc.ModbusSlave_inputRegisterWriteFloat(41002, 0.1234)
26
27## Close Modbus slave in background
28# pywpc.ModbusSlave_close()