Siemens S7-300, Connection Errors

Hey ya’ll,

I’m getting some errors connecting to an S7-300, and I’m not sure what my next step should be in troubleshooting. Here’s the set of repeating events that are filling up my logs…

S7300Driver 
Socket connection closed; DriverState was Connecting.

ConnectRequest 
ConnectRequest failed. FailureType: DISCONNECTED

NegotiatePDURequest 
NegotiatePDURequest failed. FailureType: DISCONNECTED

I can ping the PLC and view the web portal. There is another identical S7-300 rack in the plant, and its connection to Ignition is working fine.

The weird thing is that this same connection worked when I first set it up; when I came back this week it was in the disconnected state.

Thanks,
Ben

Is something else connected to this Plc? Older S7-300 processors have very limited connection resources.
You can check the used connections in the rack status.

Here’s the modules I’m dealing with:
CPU 315-2 DP
CP 343-1

Unfortunately, I can’t connect to the CPU online in order to see the occupied connection resources… I can see the CP 343-1, but the connection to the CPU cannot be established. I’m not on site, so I can’t hook up directly at the moment.

There’s an IM 365 extending the main rack, 2 remote I/O racks using IM 153-1’s, and 2 DP/AS-i Gateways listed under the HW Config. There’s also an HMI connected, and an Anybus Gatway for communicating with several Rockwell PLC’s.

In CPU Properties/Communication, the reserved resources are:
PG Communication: 1
OP Communication: 1
S7 Basic Communication: 12
S7 Communication: 0
Maximum Number of Connection Resources: 16

What exactly counts as a connection resource in the S7 series?

Though I can’t connect to the CPU, in the diagnostic buffer of the CP 343-1, there’s a bunch of error messages like this with different CID’s:

Protocol Error
CID of the connection: 33, disconnect reason 85, connection status: 3
External error, Incoming Event

This controller is a part a two identical-ish systems in this plant. The second system is communicating okay, and the controller is reporting the following connection usage:

PG Communication: 1
OP Communication: 2
S7 Basic Communication: 0
Other Communication: 1
Cycle load due to communication: 20%

It’s possible that the systems are more different than they appear to be, but the second system seems to have plenty of communications headroom.

That might be the cause of your problem. I have seen S7-300s that required a hard reset to re-enable communication.
The resource limit of the CP341 should not be a problem. In theory, every connection to a programming device, a HMI or a gateway uses a resource. The DP bus uses another mechanism.

1 Like

A hard reset got things working again, thanks Chi!

Any idea what could have caused it to stop working? We’d obviously like to avoid unrecoverable communications dropouts.

No, i have no idea what could have caused this. Upgrading the processor and the CP to the latest firmware can't hurt.

1 Like

Hello,

i have an simalar problem, i am trying to connect ignition with an CPU315-2DP including CP 343-1lean card, but i am failing to get it working when i try to ping the plc i am able to reach it, i checked the logs and it succesfully opens the TCP connection but then failed.

i also checked the communications tab in the diagnostics of the siemens CPU

could someone help me to get the communication working?


That “Connection reset” message looks like the kind of error you get when a deep packet inspection firewall decides the traffic is unsafe. Is there a firewall between your Ignition server and the PLC?

Also just to close the loop on my original issue, we eventually found some major network problems in the plant.

After fixing two separate switching loops all our communication issues went away (imagine that).

1 Like

When i have encountered this problem previously, often putting the cpu into stop and then back to run usually worked for me.

Sometimes the connection “hangs” on the plc side and locks up the connection and holds the counter of how many connection there is.