1'''
2Modbus_master - write_multi_registers.py.
3
4""" Write the contents of two analog output holding registers to the slave device."""
5
6For other examples please check:
7 https://github.com/WPC-Systems-Ltd/WPC_Stand-alone_Python_release/tree/main/examples
8
9Copyright (c) 2024 WPC Systems Ltd.
10All rights reserved.
11'''
12
13## WPC
14import pywpc
15
16host_ip = ""
17salve_id = 1
18address = 0
19value_list = [5566, 1234]
20
21## Open Modbus master
22pywpc.ModbusMaster_open(host_ip, salve_id)
23
24## Write multi value in modbus address 0
25status = pywpc.ModbusMaster_writeMultiRegisters(address, value_list)
26
27print(status)
28
29## Close Modbus master
30pywpc.ModbusMaster_close()