Tips & Example Prompts
General tips
Section titled “General tips”Be specific about what you want to know
Section titled “Be specific about what you want to know”The agent works best with a clear question. Instead of “check the PLC”, try “check the diagnostic buffer for any errors in the last 30 minutes and tell me if any are recurring.”
Give context when you have it
Section titled “Give context when you have it”If you know roughly what is wrong, say so. “The conveyor stopped unexpectedly at 14:23 — what does the diagnostic buffer say about that time?” is more useful than “why did it stop?”
Ask follow-up questions
Section titled “Ask follow-up questions”The agent remembers the conversation context. If the first answer raises more questions, keep asking. “You mentioned a module fault — which slot is it in?”
Use thinking models for complex problems
Section titled “Use thinking models for complex problems”For multi-step reasoning (fault diagnosis, code review, migration), choose Claude Opus 5 in Settings. Its thinking capability lets it work through the problem systematically before answering. Some OpenAI-compatible reasoning models support the same thinking display too — see Setup & Models.
PLC diagnostics
Section titled “PLC diagnostics”Why did the PLC go to STOP? Read the diagnostic buffer and give me a timeline of what happened.Are there any hardware faults active right now? If so, describe each one and suggest what to check.The diagnostic buffer has a lot of events. Which ones should I be concerned about and which are normal operational noise?What is the current CPU operating mode and is there anything unusual about the state?Tag monitoring
Section titled “Tag monitoring”Read the tag "ProcessData".Level and tell me if it is within the expected 0–100% range.List all the tags in the "AlarmBits" data block and show me which ones are currently TRUE.What is the difference between the setpoint and actual value for temperature control?Read "TemperatureControl".Setpoint and "TemperatureControl".Actual and compare them.Alarm analysis
Section titled “Alarm analysis”List all active alarms and explain what each one means in plain language.Which alarm has been active the longest? What could cause it to stay latched?I want to acknowledge all alarms — but first tell me if any of them indicate a safety issue I should resolve before acknowledging.TIA Portal block explanation
Section titled “TIA Portal block explanation”Read the source code for FB_MotorControl and explain what it does.Pay attention to the startup logic and the fault handling.What are the inputs and outputs of FC_PIDCalculation?Give me a short description of what each parameter does.This OB is part of a cyclic interrupt — explain when it runs and what it controls.I suspect there is a logic error in FC_SafetyCheck around the emergency stop handling.Read the source and flag any issues you see.Ladder Migration
Section titled “Ladder Migration”I exported these Ladder networks to a PDF. Please migrate them to SCL.Be conservative — preserve every rung condition exactly.After migrating, explain any assumptions you made.Review the SCL output for network 3 — the original Ladder had a SET/RESET coil patternthat I want to make sure is preserved correctly.The migrated SCL for FC_ConveyorControl has an FB instance call that looks wrong.Read the original Ladder PDF and compare it to the SCL output.Studio 5000 project to native Ladder:
Migrate Plant.L5X from my workspace to native Ladder in PLC_1.Show me the decisions first, before you generate anything.List the placeholder rungs of the migration and tell me what each one needs.Which assumptions in the migration report do I need to confirm with the machine builder?Native Ladder in TIA Portal
Section titled “Native Ladder in TIA Portal”Read FC_ConveyorStart and explain what each network does.Create a Ladder function FC_LampTest with a pushbutton input, a 3 second timer,and a lamp output. The lamp is on while the button is held, for at most 3 seconds.In FB_PumpControl, change the preset of the delay timer in network 4 to 8 seconds.Show me the change before you import it.See Native Ladder Blocks.
Code review and improvement
Section titled “Code review and improvement”Read FC_PumpControl and suggest improvements for readability.Do not change the logic — only clean up variable names and structure.Check if there are any potential issues with this SCL code before I import it into TIA Portal:[paste code here]Explain what the timing conditions in network 4 of OB_Cyclic are doing.I need to understand the delay logic before I modify it.Tips for Ladder Migration prompts specifically
Section titled “Tips for Ladder Migration prompts specifically”- Tell the agent which networks you care about most: “Focus on networks 1–5; 6 and 7 are just comments.”
- Mention the block type you want: “Migrate this as a Function (FC), not a Function Block.”
- Specify the target variable naming style: “Use snake_case for local variables.”
- If the output isn’t right, ask for a specific network: “Redo network 3 — the timer condition is wrong.”
See PDF to SCL Workflow and Reviewing SCL Output for a full walkthrough, and Studio 5000 project to native Ladder for the .L5X path.