Skip to content

Tips & Example Prompts

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.”

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?”

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?”

For multi-step reasoning (fault diagnosis, code review, migration), choose Claude Opus 4.8 in Settings. Its thinking capability lets it work through the problem systematically before answering.


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?

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.

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.

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.

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 pattern
that 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.

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 Ladder Migration Workflow and Reviewing SCL Output for a full walkthrough.