Skip to content
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

Device Offline but modbusClient.Connected returns true #93

Open
avnet78 opened this issue Feb 16, 2023 · 1 comment
Open

Device Offline but modbusClient.Connected returns true #93

avnet78 opened this issue Feb 16, 2023 · 1 comment

Comments

@avnet78
Copy link

avnet78 commented Feb 16, 2023

I am using EasyModbusTCP, Version 5.6.0

I know that the device is offline but the modbusClient.Connect() method doesn't throw an exception & modbusClient.Connected returns true.

Here's the sample code

string modbusIP = "192.168.200.16";
int modbusPort = 502;

modbusClient = new ModbusClient(modbusIP, modbusPort);
modbusClient.Connect(); 
bool isConnected = modbusClient.Connected; // I expect this line to return FALSE as the device is offline. Not sure how it is able to establish connection.

Please advise.

@francescoz-devtek
Copy link

I'm having the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants