You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Device-modbus-go connects modbus during HandleReadCommands、HandleWriteCommands in driver.go, This will client muti DeviceClient instances.
So that the "connect()" function in tcpclient.go(github.com/goburrow/modbus) be invoked multi times before the previours connection closed.
It is ok for some of the devices which have ability of muti tcp connections, but lot of others only support one tcp connection. that will get error showing in Exception section.
Hope this can be solved. At least to give one setting to config to use one tcp connection or muti tcp connections. May be it has the functionality already, but I don't know?
The device-modbus-go already implemented that by using the lock, please check whether the device is connectable, or the device does not accept the high-frequency requests.
The device-modbus-go already implemented that by using the lock, please check whether the device is connectable, or the device does not accept the high-frequency requests.
Test Device 1: (192.168.1.17 - Support one tcp connection)
Open first Modbus Poll, and reading data properly.
Open the second Modbus Poll, and cannot connect.
Use device-modbus-go to test this device. If the second reading after the first connection idle timeout, then the second connection is ok. If the second reading before the first connection idle timeout, then the second connection refused. See the logs below:
From above testing, I assume Device 1 is working. And can read frequency. And only support one tcp connection.
Test Device 2: (192.168.1.7 - Support multi tcp connections)
Open 3 modbus Polls, and reading data properly.
Use device-modbus-go to test Device 2. I submit 3 reading command in very shot time, and reading data properly, and close 3 connections after idle timeout.
From above testing, I assume Device 2 is working. And support multi tcp connections. And device-modbus-go open multi tcp connections to read data.
What I need is to set the connection count - 1 or mutiple to connect devices with different tcp capibility.
I saw that address lock source code, but it seems not able to lock the tcp connections.
🐞 Bug Report
Affected Services [REQUIRED]
The issue is located in:[device-modbus-go](Modbus TCP)
Is this a regression?
No, all versions have the same issue.Description and Minimal Reproduction [REQUIRED]
Device-modbus-go connects modbus during HandleReadCommands、HandleWriteCommands in driver.go, This will client muti DeviceClient instances.
So that the "connect()" function in tcpclient.go(github.com/goburrow/modbus) be invoked multi times before the previours connection closed.
It is ok for some of the devices which have ability of muti tcp connections, but lot of others only support one tcp connection. that will get error showing in Exception section.
Hope this can be solved. At least to give one setting to config to use one tcp connection or muti tcp connections. May be it has the functionality already, but I don't know?
🔥 Exception or Error
🌍 Your Environment
Deployment Environment:
raspiberry pi 4
EdgeX Version [REQUIRED]:
all versions
Anything else relevant?
The text was updated successfully, but these errors were encountered: