Set PDU size to 960

Allows communication with Siemens Logo 0BA8, currently no Siemens PLC
is known to support >960 PDU size.
This commit is contained in:
Michael Croes
2019-03-14 22:25:25 +01:00
parent 70506e7dba
commit 4ae905ffd5
3 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ namespace S7.Net.UnitTest
destTsap1, destTsap2, //Destination TASP
192, //Parameter Code (tpdu-size)
1, //Parameter Length
11 //TPDU Size (2^11 = 2048)
10 //TPDU Size (2^11 = 2048)
};
}
}

View File

@@ -186,7 +186,7 @@ namespace S7.Net
private byte[] GetS7ConnectionSetup()
{
return new byte[] { 3, 0, 0, 25, 2, 240, 128, 50, 1, 0, 0, 255, 255, 0, 8, 0, 0, 240, 0, 0, 3, 0, 3,
7, 128 //Try 1920 PDU Size. Same as libnodave.
3, 192 // Use 960 PDU size
};
}

View File

@@ -21,7 +21,7 @@ namespace S7.Net.Protocol
3, 0, //Destination TASP
192, //Parameter Code (tpdu-size)
1, //Parameter Length
11 //TPDU Size (2^11 = 2048)
10 //TPDU Size (2^10 = 1024)
};
switch (cpu)