-
-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Hi !
There is no physical connection.
The DBRead method predictably returns error number 9. CLI : Client not connected.
The DB Write method returns an exception System.ArgumentOutOfRangeException.
And it should, as it seemed to me, also return error number 9.
Why is this not the case?
namespace TestSharp7ConsoleApplication
{
class Program
{
static void Main()
{
int result;
byte[] db = new byte[20];
S7Client client = new S7Client();
client.ConnectTo("192.168.0.2", 0, 1);
try
{
result = client.DBRead(10, 0, db.Length, db);
Console.WriteLine($"{result} : {client.ErrorText(result)}");
result = client.DBWrite(10, 0, db.Length, db);
Console.WriteLine($"{result} : {client.ErrorText(result)}");
}
catch (System.ArgumentOutOfRangeException e)
{
result = -1;
Console.WriteLine($"{result} : {e.Message}");
}
Console.WriteLine();
Console.WriteLine("Press <Enter> for exit");
Console.ReadLine();
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers