Click here to Skip to main content
14,271,891 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am using Settimino library for communicating with s7-300, getting error.
PLC IP and Device(Arduino Mega 2560 + W21000 shield) IP is ok.

Help required.
my connection code...


Serial Monitor output.....

Cable Connected
Local IP address :192.168.1.102

Connecting to 192.168.1.11..
Connection error

What I have tried:

bool Connect()
  {
    int Result=Client.ConnectTo(PLC, 
                                  0,  // Rack (see the doc.)
                                  2); // Slot (see the doc.)
    Serial.print("Connecting to ");Serial.println(PLC);  
    if (Result==0) 
    {
      Serial.print("Connected ! PDU Length = ");
      Serial.println(Client.GetPDULength());
    }
    else
      Serial.println("Connection error");
    return Result==0;
    
    }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100