Manually close modbus socket
This commit is contained in:
parent
7885c0900d
commit
6347cde9e2
4
run.py
4
run.py
@ -423,7 +423,7 @@ def setup_server(pool, manager):
|
||||
if sensor_ready is False:
|
||||
fprint("waiting for " + "Sensor Initialization" + " to complete...", sendqueue=to_server_queue)
|
||||
global mbconn
|
||||
mbconn = ModbusClient(host="192.168.1.20", port=502, auto_open=True, auto_close=False)
|
||||
mbconn = ModbusClient(host="192.168.1.20", port=502, auto_open=False, auto_close=False)
|
||||
get_sensors()
|
||||
fprint("Sensors initialized.", sendqueue=to_server_queue)
|
||||
|
||||
@ -462,7 +462,7 @@ def get_sensors():
|
||||
global sensors
|
||||
oldsens = sensors
|
||||
#print("Reading sensors")
|
||||
# mbconn.open()
|
||||
mbconn.open()
|
||||
"""
|
||||
port 1: 256
|
||||
port 2: 272
|
||||
|
Loading…
x
Reference in New Issue
Block a user