Skip to content

Troubleshooting

Causes:

  • The S7 WebServer is not enabled on the CPU.
  • Port 443 (HTTPS) is blocked by a firewall between your PC and the PLC.
  • The IP address is wrong.

Fix:

  1. Open TIA Portal, go to CPU properties → Web server, and confirm Activate web server is ticked.
  2. Compile hardware and download to PLC.
  3. Try pinging the PLC IP from a Command Prompt: ping 192.168.0.1.
  4. If ping works but port 443 doesn’t, contact your network admin about the firewall.

Causes:

  • Wrong username or password.
  • The user account doesn’t exist in the PLC’s WebServer user list.
  • The user account has expired or been disabled.

Fix:

  1. In TIA Portal, go to CPU properties → Web server → User management.
  2. Confirm the username exists and has a matching password.
  3. Download the hardware configuration to the PLC.

S7 PLC Buddy uses a 60-second heartbeat to keep the PLC session alive. If the session still drops:

  • Check that the PC’s network interface isn’t sleeping (Power Management → disable “Allow the computer to turn off this device to save power” for the NIC).
  • Check that the PLC is not configured with an unusually short session timeout in its WebServer settings.

Diagnostic buffer shows #253, 15 instead of text

Section titled “Diagnostic buffer shows #253, 15 instead of text”

This is a known issue with the Siemens WebServer API when the language code is specified incorrectly. S7 PLC Buddy uses the correct format (en-US) by default. If you see unresolved text references, check that your PLC firmware is at the minimum supported version (see WebServer Setup).


The Anthropic API key is wrong or has been revoked.

Fix:

  1. Go to console.anthropic.com → API Keys.
  2. Confirm your key is active. Create a new one if needed.
  3. In S7 PLC Buddy → Settings → AI Agent, paste the key and click Save.

The agent only reads PLC data when you ask it to. If your question doesn’t explicitly require it, the agent answers from its general knowledge.

Fix: Be explicit: “Read the diagnostic buffer and tell me…” or “Check the current CPU status.”


If the PLC disconnected during a conversation, tool calls that require live PLC data will fail.

Fix: Reconnect via Settings → Connections, then retry your question.


Complex conversations with many tool calls (especially diagnostic buffer reads) consume more tokens.

Reduce costs by:

  • Switching to Claude Sonnet 4.6 or Haiku 4.5 for simpler questions.
  • Starting a new conversation for each distinct task (avoids growing context from previous messages).
  • Avoiding the browse_plc_tags tool on large tag namespaces unless you need it.

TIA Portal is not running, or it’s running but has no project open.

Fix: Open TIA Portal V21 and load a project, then click Connect in S7 PLC Buddy.


The bundled MCP server uses the V21 Openness API. Earlier versions of TIA Portal are not compatible.


Block export fails with “Inconsistent blocks” error

Section titled “Block export fails with “Inconsistent blocks” error”

TIA Portal requires blocks to be compiled before export. This can happen if a block was recently modified and not recompiled.

Fix: In TIA Portal, compile the affected block (Compile → Software), then retry the operation in S7 PLC Buddy.


The Ladder Migration MCP server parses PDF pages — large programs (50+ networks) can take 1–3 minutes. Wait for the pending indicator to clear.

If it times out (> 10 minutes), the PDF may be image-only (scanned) rather than vector. Re-export from TIA Portal using the print function to get a proper vector PDF.


Migrated SCL doesn’t compile in TIA Portal

Section titled “Migrated SCL doesn’t compile in TIA Portal”

Common causes:

  • Type mismatch — a variable is used as a different type than declared. Ask the agent: “The compiler reports type error on line 42 — can you fix it?”
  • Missing interface declaration — a variable used in the body wasn’t declared in the interface. Ask the agent to add it.
  • Undefined symbol — a tag from the PLC tag table is referenced but not declared. Replace with a local parameter or declare as an external reference.

When contacting support, include the application log:

  1. Go to Settings → System → Diagnostics.
  2. Click Show in Explorer to open the log folder.
  3. Attach main.log to your support email.

Contact: s7plcbuddy+contact@gmail.com