first commit

This commit is contained in:
2025-07-29 13:16:30 +08:00
commit dca51db4eb
145 changed files with 721268 additions and 0 deletions

13
COM/testTCP.py Normal file
View File

@ -0,0 +1,13 @@
import sys
print(sys.executable)
from pymodbus.client import ModbusTcpClient
client = ModbusTcpClient('192.168.0.123', port=502)
if client.connect():
print("🟢 Modbus 连接成功")
result = client.read_coils(0, 1, unit=1)
print("读取结果:", result)
else:
print("🔴 Modbus 连接失败")