Troubleshooting
PLC connection issues
Section titled “PLC connection issues”“Connection refused” on connect
Section titled ““Connection refused” on connect”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:
- Open TIA Portal, go to CPU properties → Web server, and confirm Activate web server is ticked.
- Compile hardware and download to PLC.
- Try pinging the PLC IP from a Command Prompt:
ping 192.168.0.1. - If ping works but port 443 doesn’t, contact your network admin about the firewall.
“Invalid credentials” on connect
Section titled ““Invalid credentials” on connect”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:
- In TIA Portal, go to CPU properties → Web server → User management.
- Confirm the username exists and has a matching password.
- Download the hardware configuration to the PLC.
Session drops after a few minutes
Section titled “Session drops after a few minutes”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).
AI Agent issues
Section titled “AI Agent issues”“Invalid API key” error
Section titled ““Invalid API key” error”The Anthropic API key is wrong or has been revoked.
Fix:
- Go to console.anthropic.com → API Keys.
- Confirm your key is active. Create a new one if needed.
- In S7 PLC Buddy → Settings → AI Agent, paste the key and click Save.
The AI Agent responds but has no PLC data
Section titled “The AI Agent responds but has no PLC data”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.”
The agent’s tool calls fail silently
Section titled “The agent’s tool calls fail silently”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.
API cost is higher than expected
Section titled “API cost is higher than expected”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_tagstool on large tag namespaces unless you need it.
TIA Portal integration issues
Section titled “TIA Portal integration issues”“Portal not found” on connect
Section titled ““Portal not found” on connect”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.
Only TIA Portal V21 is supported
Section titled “Only TIA Portal V21 is supported”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.
Ladder Migration issues
Section titled “Ladder Migration issues”PDF parsing takes a long time
Section titled “PDF parsing takes a long time”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.
Getting logs
Section titled “Getting logs”When contacting support, include the application log:
- Go to Settings → System → Diagnostics.
- Click Show in Explorer to open the log folder.
- Attach
main.logto your support email.
Contact: s7plcbuddy+contact@gmail.com