My understand that newer LOGO do not use TSAP that was used for older LOGO.
Here is words from Helmut himself (long time Product manager for LOGO)
Basically TSAP (Transport Service Access Point) is comming from the past where Controller havn't had Ethernet on board.
At this time Ethernet was only possible via CP connected mostly to EM-Bus and so the CP has to know the position in the configuration.
Today it is RACK and SLOT.
If you configure a LOGO! - LOGO!) then each chanel get its own TSAP.
LOGO! supports 8 chanels. If you configure it for LOGO! - LOGO!, then the first Ethernet connection
will get TSAP 20:00, second 21.00 und so on.
HMI is different. If you enable to use a HMI, then the HMI requires the TSAP 02.00 at the controller side.
So if you do a LOGO! - LOGO! exchange then you have to use right TSAP. If not it will not work.
So of course I need to test it and s7Client.ConnectTo(PLC, 0, 0); also work with LOGO 8.3
I could inform you, I solve it by update the platform.h and include
#ifdef ARDUINO_GIGA
#include <WiFi.h>
#define S7WIFI
#endif
And here is the example using WriteBit
#include <Platform.h>
#include <Settimino.h>
IPAddress PLC(PLC_IP); // PLC Address
char ssid[] = "SSID";
char pass[] = "PASSWORD";
S7Client s7Client;
void setup() {
Serial.begin(115200);
#ifdef S7WIFI
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.print("Local IP address : ");
Serial.println(WiFi.localIP());
#endif
s7Client.SetConnectionParams(PLC, 0x03, 0x02);
s7Client.Connect();
Serial.println(s7Client.Connected);
}
void Dump(void *Buffer, int Length)
{
int i, cnt=0;
pbyte buf;
if (Buffer!=NULL)
buf = pbyte(Buffer);
else
buf = pbyte(&PDU.DATA[0]);
Serial.print("[ Dumping ");Serial.print(Length);
Serial.println(" bytes ]===========================");
for (i=0; i<Length; i++)
{
cnt++;
if (buf[i]<0x10)
Serial.print("0");
Serial.print(buf[i], HEX);
Serial.print(" ");
if (cnt==16)
{
cnt=0;
Serial.println();
}
}
Serial.println("===============================================");
}
void loop() {
void *Target;
int Result;
//Target = NULL;
//Result = s7Client.ReadArea(S7AreaDB, 1, 2, 64, Target);
//Serial.println(Result);
//Dump(Target, 64);
s7Client.WriteBit(S7AreaDB, 1, 2, 0, true);
}