-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux / IsConnected #127
Comments
Are you using Modbus TCP oder Modbus RTU? In case of Modbus TCP it is just forwarding the status of the underlying
So it depends on the implementation of This is all I know about what happens underneath, sorry I could not help more. |
You can pass your own TcpClient so you have full control over it:
|
I will try my own client and see what I get. In the mean time, I was just about to try a work around where I catch the exception (shown below) on reads and use that to know I have lost connection. When this happens on linux, I get this on any read:
|
I have code that is shared between Windows and Linux that uses the FluentModbus client (synchronous) to talk to Modbus devices. I am currently testing failures such as the Modbus device is turned off or disconnected from the network.
On Windows, the code works perfectly - meaning that the IsConnected flag goes to false after having previously been true from before I turned the device off.
However, on Linux, it establishes the connection and the IsConnected flag is true. I then turn the device off, but the the IsConnected flag never goes to false.
Any thoughts on how to fix or work around this?
The text was updated successfully, but these errors were encountered: