S5/S7 AI Copilot: Difference between revisions

From IBHsoftec Wiki English
Jump to navigation Jump to search
Added the English S5/S7 AI Copilot user guide
 
Document multilingual answers with examples
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Copilot in '''S5/S7 AI for Windows®''' is an AI-assisted tool for analyzing,
=== S5/S7 AI Copilot ===
understanding and diagnosing PLC projects. It can use the open project,
selected block, active network and, when requested, current values from a
connected PLC.


Copilot supports the engineer but does not replace technical review, safety
Copilot in '''S5/S7 AI for Windows®''' is an AI-assisted tool for analysis,
assessment or commissioning tests.
diagnostics, source-code understanding and PLC troubleshooting. It works with
the open project, the current block, the active network and, when required,
current online values from the connected PLC.


== Typical uses ==
Copilot does not replace technical review by the user. It helps engineers find
their way around a project more quickly, recognize relationships and answer
technical questions more specifically.


* explain blocks, networks and signal flow;
==== Typical uses ====
* find write locations, enable conditions and interlocks;
* analyze project structure and important blocks;
* include live PLC values in diagnostic questions;
* evaluate recorded signals and timing;
* explain or draft S7 STL/AWL code;
* create technical summaries.


== Starting Copilot ==
* Analyze existing S5 and S7 projects
* Explain blocks, networks and signal flow
* Find write locations, enable conditions and interlocks
* Diagnose faults using live PLC values
* Evaluate recorded variables and signal timing
* Create and understand S7 STL/AWL
* Produce documentation and technical summaries


# Open the required S5 or S7 project.
==== Opening Copilot ====
# Display the relevant block or network.
 
Copilot is started from S5/S7 AI for Windows. The Copilot dialog contains the
question input and displays the answers.
 
For the most useful answer, open the relevant project context before asking:
 
* the affected project;
* the relevant block;
* the relevant network, if possible;
* an active PLC connection for online questions.
 
==== Access to AI ====
 
Depending on the installation and license, Copilot can use several access
methods. Select the required connection in the <code>Provider</code> field.
 
{| class="wikitable"
! Selection
! Description
! Suitable for
|-
| <code>IBHsoftec Server</code>
| Access through the server provided by IBHsoftec.
| Standard users without their own API key
|-
| <code>Company Server</code>
| Access through a server operated by the user's company.
| Companies with centrally managed AI access
|-
| <code>OpenAI Direct</code>
| Copilot connects directly to OpenAI.
| Users with their own OpenAI API key
|-
| <code>Google Gemini</code>
| Copilot connects directly to the Google Gemini API.
| Users with their own Gemini API key
|-
| <code>General LLM</code>
| Direct connection to an OpenAI-compatible API such as Ollama, Open WebUI, vLLM or LiteLLM.
| Local or internal language models
|-
| <code>Claude Direct</code>
| Direct connection to the Anthropic API.
| Users with their own Anthropic API key
|-
| <code>Microsoft Foundry</code>
| Direct connection to a deployed Azure or Foundry model.
| Companies using Microsoft Foundry
|}
 
For most users, <code>IBHsoftec Server</code> is the simplest option because
no personal OpenAI API key is required.
 
More details are provided under
[[S5/S7 AI for Windows:Copilot access to AI|Copilot access to AI]].
 
==== Models and context size ====
 
For <code>General LLM</code>, <code>OpenAI Direct</code>,
<code>Google Gemini</code>,
<code>Company Server</code> and <code>IBHsoftec Server</code>, Copilot
automatically requests the available models. The list is refreshed when
Copilot opens, when the provider changes and when the model list is opened.
 
Microsoft Foundry uses the Azure deployment name. This name is entered
manually.
 
For <code>Google Gemini</code>, enter the API key in the dialog or provide it
through the <code>GEMINI_API_KEY</code> environment variable. The voice
dialog is not available with Google Gemini.
 
If the server reports a context size, Copilot displays it as a token count.
Only <code>General LLM</code> uses a more compact initial project context for
small local models.
 
==== Multilingual answers ====
 
Copilot can answer in all languages. Examples include German, English, French,
Spanish, Italian, Dutch, Polish, Turkish, Arabic, Chinese, Japanese and Thai.
All other languages can also be used for questions and answers.
 
Copilot normally replies in the language used for the question. The required
answer language can also be stated explicitly, for example:
 
<pre>
Reply in Spanish from now on.
Explain this block in English.
Summarize the result in Thai.
</pre>
 
Short examples:
 
'''Turkish'''
<pre>
Soru: FB 35 ne yapıyor?
Cevap: FB 35 pompa kumandasını ve ilgili çalışma koşullarını işler.
</pre>
 
'''Arabic'''
<pre>
السؤال: لماذا لا يعمل الخرج A 8.0؟
الإجابة: الخرج A 8.0 غير مفعّل لأن شرط السماح المرتبط به غير متحقق حالياً.
</pre>
 
'''Chinese'''
<pre>
问题:为什么输出 A 8.0 没有接通?
回答:输出 A 8.0 未接通,因为相关的使能条件当前未满足。
</pre>
 
The language can be changed at any time during an ongoing conversation.
Technical operands, symbol names, block names and source code remain unchanged
so that they still match the PLC project unambiguously.
 
Language quality may vary depending on the selected provider and AI model.
Technical terms and safety-related statements must therefore still be
reviewed by the user.
 
==== File attachments ====
 
Depending on the provider, Copilot can attach supported images, PDF files,
text files and source-code files to a request. File size, readability and
supported format are checked before transmission.
 
==== Analyze ====
 
The <code>Analyze</code> button creates a technical overall analysis of the
current project. It covers project structure, important blocks, data flow,
technical risks and open questions.
 
==== First use ====
 
# Start S5/S7 AI for Windows.
# Open a project.
# Display the relevant block or program area.
# Open Copilot.
# Open Copilot.
# Select the required AI provider.
# Select the required provider.
# Ask a specific technical question.
# If required, enter the license, server address or API key.
# Ask a specific question.
 
Example:
 
<pre>
Explain the currently open block.
</pre>
 
==== Asking good questions ====
 
Copilot works best with specific technical questions. The more precisely a
question is formulated, the more focused the answer can be.
 
Good examples:
 
* <code>What does the currently open block do?</code>
* <code>In which network is the enable generated?</code>
* <code>Where is Q 8.0 written?</code>
* <code>Why is Q 8.0 not set?</code>
* <code>Which conditions block the enable?</code>
* <code>Show the block list.</code>
* <code>Create an STL/AWL block for a simple motor interlock.</code>
 
Very general questions without project context are less useful:
 
* <code>What is wrong?</code>
* <code>Why does the machine not work?</code>
 
It is better to include a signal, block or observed behavior.
 
==== Project analysis ====
 
Copilot can summarize the open project or current block. It uses the available
project context, block information and source code.


Examples:
Typical questions:


<pre>
<pre>
Analyze the project.
Explain the currently open block.
Explain the currently open block.
Where is Q 8.0 written?
Which blocks are important?
Which conditions block the motor enable?
What does this network do?
Analyze the open PLC project.
</pre>
</pre>


The available providers and required settings are described here:
Typical answers can include:
[[S5/S7 AI for Windows:Copilot access to AI|Copilot access to AI]]


== Project context ==
* a short functional description;
* important blocks;
* relevant signals and data areas;
* possible dependencies;
* anomalies or technical risks.


Copilot automatically collects relevant information from the open project.
==== Signal and enable diagnostics ====
Depending on the question, this may include:


* project and block structure;
For questions about signals, enables or outputs, Copilot uses the active
* the active block and network;
context to find relationships in the program.
* symbols, addresses and cross-references;
* data flow and write locations;
* diagnostic information;
* requested live values.


The more precisely the question identifies a signal, block or observed
Typical questions:
behavior, the more useful the answer will be.


== Analyze ==
<pre>
Where is Q 8.0 written?
Where is DB36.DBX3.1 set?
Why is Q 8.0 not set?
Which condition blocks the enable?
</pre>


The <code>Analyze</code> button requests a technical overview of the current
Copilot can point to relevant networks, conditions, cross-references and write
PLC project. The result covers project structure, important blocks, data flow,
locations. If the current PLC state is needed, it can request live values.
technical risks and open questions.


== Live values ==
==== Live PLC values ====


With an active online connection, Copilot can include current PLC information
With an active online connection, Copilot can include current PLC information
in an answer. Examples include:
in an answer. This is especially useful when the current state is important
for a diagnosis.
 
Possible online information includes:


* CPU operating state;
* CPU operating state;
* diagnostic buffer;
* diagnostic buffer;
* U-stack;
* specific operands;
* specific operands;
* specific data block fields;
* specific data block fields;
Line 72: Line 246:


<pre>
<pre>
Read the current value of Q 8.0.
Read the online status.
Is the enable currently active?
Is the enable currently active?
Read the current live values for Q 8.0.
Why is pump 1 not running?
Why is pump 1 not running?
</pre>
</pre>


Use a specific data address such as <code>DB13.DBX0.0</code>,
'''Important:''' Only specific operands or data fields can be read directly.
<code>DB13.DBW4</code> or <code>DB13.DBD20</code>. A complete block such as
Complete blocks such as <code>DB13</code>, <code>FB20</code> or
<code>DB13</code> is not a single live value.
<code>OB1</code> are not individual live values. For data blocks, specify an
address such as <code>DB13.DBX0.0</code>, <code>DB13.DBW4</code> or
<code>DB13.DBD20</code>.


== Signal recording and timing ==
==== Block status ====


Signals can be recorded over time and evaluated by Copilot.
For S7 code blocks, Copilot can include status information from the active
block. This helps answer sequence and signal questions without requiring the
user to trace every condition manually.
 
Examples:
 
<pre>
Read the block status.
Can you read the status of this block?
Show the online status of the current block.
</pre>
 
Availability depends on the project, block type, online connection and PLC
state.
 
==== Variable recording ====
 
Copilot can use the recording functions to observe signals over time. This is
useful when behavior must be evaluated over a sequence rather than from a
single snapshot.
 
Start a recording:
 
<pre>
Record I 0.0.
Record I 0.0 and Q 8.0.
Record DB36.DBX3.1 and DB36.DBX3.2.
</pre>
 
Stop a recording:
 
<pre>
Stop the recordings.
Stop status recording.
Stop recording.
</pre>
 
The recording runs in the background until it is stopped or the corresponding
diagnostic function ends.
 
==== Timing and signal history ====
 
Copilot can evaluate timing and signal edges from recorded values.
 
Examples:
 
<pre>
How long did it take from I 0.0 to Q 8.0?
How long was M 10.0 active?
How long was Q 8.0 equal to 1?
When did the first rising edge of I 0.0 occur?
Show all edges of Q 8.0.
What are the intervals between the edges of M 10.0?
</pre>
 
'''Important:''' Reliable timing requires the relevant values to have been
recorded beforehand. Copilot cannot reconstruct a dependable signal history
without a recording.
 
==== Creating and explaining S7 STL/AWL ====
 
Copilot can explain S7 STL/AWL and create new STL/AWL source code. This is
useful for templates, prototypes, documentation and understanding existing
logic.
 
Examples:
 
<pre>
Explain this STL/AWL block.
Create an STL/AWL function block for a conveyor control.
Write importable S7 STL/AWL source code for a motor starter.
Generate an FB for a simple conveyor simulation.
</pre>
 
If the latest Copilot answer contains a complete STL/AWL block, it can be
saved with <code>Save AW7...</code>.
 
==== Saving AW7 ====
 
<code>Save AW7...</code> saves the last recognized complete S7 STL/AWL block
as an <code>.aw7</code> file.
 
Notes:
 
* The function is useful only when the latest answer contains a complete block.
* Arbitrary text is not saved as AW7.
* The file name can be selected when saving.
* Generated code must be reviewed before productive use.
 
==== Examples of typical workflows ====
 
===== Missing enable =====
 
# Open the affected block or signal in the project.
# Ask Copilot:
 
<pre>
Why is Q 8.0 not set?
</pre>
 
# Copilot checks the context and reads live values if required.
# The answer identifies possible blocking conditions or relevant networks.
 
===== Finding a network =====
 
<pre>
In which network is the enable generated?
</pre>
 
Copilot uses the active block and available cross-references to narrow down
the relevant program area.
 
===== Measuring signal timing =====
 
# Start the recording:


<pre>
<pre>
Record I 0.0 and Q 8.0.
Record I 0.0 and Q 8.0.
</pre>
# Run the machine or sequence.
# Stop the recording:
<pre>
Stop the recordings.
</pre>
# Evaluate the timing:
<pre>
How long did it take from I 0.0 to Q 8.0?
</pre>
===== Creating an AWL block =====
<pre>
Create an importable S7 STL/AWL function block for a simple motor interlock
with start, stop, fault and feedback.
</pre>
Review the generated block and save it with <code>Save AW7...</code> if
required.
===== Complete example: Analyzing a missing motor enable with Copilot =====
====== Initial situation ======
An engineer is working with an existing S7 project in S5/S7 AI for Windows.
A conveyor does not start. The motor is controlled by output
<code>Q 8.0</code>.
The engineer wants to find out why the output is not switched on.
====== Objective ======
Copilot should help narrow down the cause:
* Which block or network generates the enable?
* Which conditions block the motor?
* Are the current input signals and interlocks in the correct state?
* Which checks should be performed next?
====== Preparation ======
Before asking Copilot, the engineer opens:
* the affected project;
* the suspected control block, for example <code>FB20 Motor_1</code>;
* the network containing the motor enable, if known;
* an online connection to the PLC.
The provider in the Copilot dialog has already been configured.
====== Step 1: Ask the first question ======
The engineer asks:
<pre>
Why is Q 8.0 not set?
</pre>
A possible Copilot answer:
<pre>
Output Q 8.0 is generated in the current block by the motor enable.
Several conditions precede the output in the open network:
- Start request I 0.0
- Stop pushbutton I 0.1 must not be active
- Fault M 10.0 must not be set
- Safety enable DB36.DBX3.1 must be active
- Fault feedback DB36.DBX3.2 must not be active
I need the current live values of these signals for a reliable conclusion.
</pre>
Depending on the situation, Copilot reads the relevant live values directly
or requests them internally.
====== Step 2: Include live values ======
The engineer asks:
<pre>
Read the current live values for I 0.0, I 0.1, M 10.0,
DB36.DBX3.1, DB36.DBX3.2 and Q 8.0.
</pre>
A possible Copilot answer:
<pre>
Current live values:
I 0.0 = 1
I 0.1 = 0
M 10.0 = 0
DB36.DBX3.1 = 0
DB36.DBX3.2 = 0
Q 8.0 = 0
The start request is present and the stop pushbutton is not active.
There is also no fault through M 10.0 or DB36.DBX3.2.
However, safety enable DB36.DBX3.1 is 0. The motor enable therefore remains
blocked and Q 8.0 is not switched on.
</pre>
====== Step 3: Narrow down the cause ======
The engineer asks:
<pre>
Where is DB36.DBX3.1 generated?
</pre>
A possible Copilot answer:
<pre>
DB36.DBX3.1 is written in FB12, network 4.
The enable is generated there from the following conditions:
- Emergency-stop circuit OK
- Safety guard closed
- Drive ready
- No group fault
Because DB36.DBX3.1 is currently 0, this network should be checked online next.
</pre>
====== Step 4: Check the current status of the enable network ======
The engineer opens <code>FB12</code>, network 4, and asks:
<pre>
Read the block status in the current network.
</pre>
A possible Copilot answer:
<pre>
The enable chain is interrupted in the current network.
The "Safety guard closed" condition is not fulfilled.
The other conditions are currently true:
- Emergency-stop circuit OK = 1
- Drive ready = 1
- No group fault = 1
DB36.DBX3.1 is therefore not set.
</pre>
====== Step 5: Summarize the result ======
The engineer asks:
<pre>
Summarize the cause and the next checks.
</pre>
A possible Copilot answer:
<pre>
Cause:
Output Q 8.0 remains off because safety enable DB36.DBX3.1 is not active.
The safety enable is generated in FB12, network 4. The "Safety guard closed"
condition is currently not fulfilled.
Next checks:
1. Check the safety guard and its safety switch.
2. Check the guard input signal online.
3. If the guard is mechanically closed, check the wiring and safety relay.
4. After correcting the fault, verify that DB36.DBX3.1 becomes 1.
5. Then verify that Q 8.0 switches on.
</pre>
====== Optional: Check timing behavior ======
If the motor fails to start only occasionally, the engineer can record
signals.
Start the recording:
<pre>
Record I 0.0, DB36.DBX3.1 and Q 8.0.
</pre>
After a start attempt:
<pre>
Stop the recordings.
Stop the recordings.
</pre>
Evaluate the timing:
<pre>
How long did it take from I 0.0 to Q 8.0?
How long did it take from I 0.0 to Q 8.0?
Show all rising edges of M 10.0.
</pre>
</pre>


Recorded values are useful when the cause of a fault cannot be determined from
Or:
a single snapshot.


== File attachments ==
<pre>
Show all edges of DB36.DBX3.1.
</pre>


Depending on the selected provider, Copilot can process supported images, PDF
====== Example of final documentation ======
files, text files and source code files. Files are checked for readability,
size and format before they are sent.


== Good diagnostic questions ==
The engineer can also ask Copilot to create a short service report from the
analysis.


Good questions contain the affected signal and the observed behavior:
Question:


<pre>
<pre>
Q 8.0 remains off although I 0.0 is on. Which condition is missing?
Create a short service report from this analysis.
Where is DB36.DBX3.1 set and reset?
Which network creates the motor enable?
</pre>
</pre>


Avoid questions without project context such as <code>What is wrong?</code>.
A possible answer:
 
<pre>
During diagnosis of the conveyor motor, output Q 8.0 did not switch on even
though the start request was present.
 
Analysis of the enable chain showed that safety enable DB36.DBX3.1 was not
active. This enable is generated in FB12, network 4. In online status, the
"Safety guard closed" condition was not fulfilled.
 
Recommended actions:
- Mechanically check the safety guard
- Check the safety switch and wiring
- Check the input signal in PLC status
- After correcting the fault, recheck DB36.DBX3.1 and output Q 8.0
</pre>
 
====== Benefits of Copilot in this example ======
 
Copilot helps the engineer perform the diagnosis systematically:
 
* from the affected output to the enable condition;
* from the enable condition to the generating logic;
* from the logic to the current live values;
* from the live values to specific checks;
* from troubleshooting to a short service report.
 
'''Note:''' The block numbers, operands and signal names used here are
examples. In a real project, block numbers, networks, symbol names and
addresses can differ.
 
The example is also available as a separate page:
[[Complete example: Analyze a missing motor enable with Copilot|Analyze a
missing motor enable with Copilot]].
 
==== Data protection and project data ====
 
Depending on the question, Copilot can transfer information from the current
project to the selected AI service. This can include blocks, networks,
cross-references, symbols and live values.
 
Before use, determine which provider is permitted by the rules of your
organization.
 
Recommendations:
 
* Follow internal data-protection and IT requirements.
* Do not include unnecessary confidential information in free-text questions.
* For sensitive systems, use the provider approved by the organization.
* Do not share API keys or copy them into documents or email.
 
==== Copilot limitations ====
 
Copilot is an assistance system. It can provide guidance and make
relationships visible more quickly, but it cannot replace final technical
approval.
 
Important limitations:


== Important limitations ==
* Answers must be reviewed for safety-related changes.
* Live values require a suitable online connection.
* Timing results are reliable only after a recording.
* Complete blocks are not directly readable PLC values.
* Copilot must not claim process-related causes that cannot be derived from project or PLC data.
* Generated STL/AWL must be tested and approved before use.


* AI responses can be incomplete or incorrect.
==== Practical advice ====
* Generated PLC code must be reviewed and tested before use.
 
* Live values are available only with a suitable online connection.
* Include signal names or operands in diagnostic questions.
* Project data may be transferred to the selected AI provider.
* Open the relevant block before asking.
* Use only providers approved by your organization for confidential projects.
* For online questions, verify that the PLC connection is active.
* For timing questions, record first and evaluate afterwards.
* Treat answers as technical guidance and review them professionally.
* If an answer is unclear, ask a more specific follow-up question containing a network, operand or block name.
 
==== Short example questions ====
 
<pre>
Analyze the project.
Explain the current block.
What does this network do?
Show the block list.
Where is Q 8.0 written?
Why is Q 8.0 not set?
Which conditions block the enable?
Read the online status.
Read the current live value for DB36.DBX3.1.
Record I 0.0 and Q 8.0.
Stop the recordings.
How long was M 10.0 active?
Show all edges of I 0.0.
Create an AWL block for a motor interlock.
</pre>


== Further documentation ==
==== Further documentation ====


* [[S5/S7 AI for Windows:Copilot access to AI|Copilot access to AI]]
* [[S5/S7 AI for Windows:Copilot access to AI|Copilot access to AI]]

Latest revision as of 13:57, 23 July 2026

S5/S7 AI Copilot

Copilot in S5/S7 AI for Windows® is an AI-assisted tool for analysis, diagnostics, source-code understanding and PLC troubleshooting. It works with the open project, the current block, the active network and, when required, current online values from the connected PLC.

Copilot does not replace technical review by the user. It helps engineers find their way around a project more quickly, recognize relationships and answer technical questions more specifically.

Typical uses

  • Analyze existing S5 and S7 projects
  • Explain blocks, networks and signal flow
  • Find write locations, enable conditions and interlocks
  • Diagnose faults using live PLC values
  • Evaluate recorded variables and signal timing
  • Create and understand S7 STL/AWL
  • Produce documentation and technical summaries

Opening Copilot

Copilot is started from S5/S7 AI for Windows. The Copilot dialog contains the question input and displays the answers.

For the most useful answer, open the relevant project context before asking:

  • the affected project;
  • the relevant block;
  • the relevant network, if possible;
  • an active PLC connection for online questions.

Access to AI

Depending on the installation and license, Copilot can use several access methods. Select the required connection in the Provider field.

Selection Description Suitable for
IBHsoftec Server Access through the server provided by IBHsoftec. Standard users without their own API key
Company Server Access through a server operated by the user's company. Companies with centrally managed AI access
OpenAI Direct Copilot connects directly to OpenAI. Users with their own OpenAI API key
Google Gemini Copilot connects directly to the Google Gemini API. Users with their own Gemini API key
General LLM Direct connection to an OpenAI-compatible API such as Ollama, Open WebUI, vLLM or LiteLLM. Local or internal language models
Claude Direct Direct connection to the Anthropic API. Users with their own Anthropic API key
Microsoft Foundry Direct connection to a deployed Azure or Foundry model. Companies using Microsoft Foundry

For most users, IBHsoftec Server is the simplest option because no personal OpenAI API key is required.

More details are provided under Copilot access to AI.

Models and context size

For General LLM, OpenAI Direct, Google Gemini, Company Server and IBHsoftec Server, Copilot automatically requests the available models. The list is refreshed when Copilot opens, when the provider changes and when the model list is opened.

Microsoft Foundry uses the Azure deployment name. This name is entered manually.

For Google Gemini, enter the API key in the dialog or provide it through the GEMINI_API_KEY environment variable. The voice dialog is not available with Google Gemini.

If the server reports a context size, Copilot displays it as a token count. Only General LLM uses a more compact initial project context for small local models.

Multilingual answers

Copilot can answer in all languages. Examples include German, English, French, Spanish, Italian, Dutch, Polish, Turkish, Arabic, Chinese, Japanese and Thai. All other languages can also be used for questions and answers.

Copilot normally replies in the language used for the question. The required answer language can also be stated explicitly, for example:

Reply in Spanish from now on.
Explain this block in English.
Summarize the result in Thai.

Short examples:

Turkish

Soru: FB 35 ne yapıyor?
Cevap: FB 35 pompa kumandasını ve ilgili çalışma koşullarını işler.

Arabic

السؤال: لماذا لا يعمل الخرج A 8.0؟
الإجابة: الخرج A 8.0 غير مفعّل لأن شرط السماح المرتبط به غير متحقق حالياً.

Chinese

问题:为什么输出 A 8.0 没有接通?
回答:输出 A 8.0 未接通,因为相关的使能条件当前未满足。

The language can be changed at any time during an ongoing conversation. Technical operands, symbol names, block names and source code remain unchanged so that they still match the PLC project unambiguously.

Language quality may vary depending on the selected provider and AI model. Technical terms and safety-related statements must therefore still be reviewed by the user.

File attachments

Depending on the provider, Copilot can attach supported images, PDF files, text files and source-code files to a request. File size, readability and supported format are checked before transmission.

Analyze

The Analyze button creates a technical overall analysis of the current project. It covers project structure, important blocks, data flow, technical risks and open questions.

First use

  1. Start S5/S7 AI for Windows.
  2. Open a project.
  3. Display the relevant block or program area.
  4. Open Copilot.
  5. Select the required provider.
  6. If required, enter the license, server address or API key.
  7. Ask a specific question.

Example:

Explain the currently open block.

Asking good questions

Copilot works best with specific technical questions. The more precisely a question is formulated, the more focused the answer can be.

Good examples:

  • What does the currently open block do?
  • In which network is the enable generated?
  • Where is Q 8.0 written?
  • Why is Q 8.0 not set?
  • Which conditions block the enable?
  • Show the block list.
  • Create an STL/AWL block for a simple motor interlock.

Very general questions without project context are less useful:

  • What is wrong?
  • Why does the machine not work?

It is better to include a signal, block or observed behavior.

Project analysis

Copilot can summarize the open project or current block. It uses the available project context, block information and source code.

Typical questions:

Analyze the project.
Explain the currently open block.
Which blocks are important?
What does this network do?

Typical answers can include:

  • a short functional description;
  • important blocks;
  • relevant signals and data areas;
  • possible dependencies;
  • anomalies or technical risks.

Signal and enable diagnostics

For questions about signals, enables or outputs, Copilot uses the active context to find relationships in the program.

Typical questions:

Where is Q 8.0 written?
Where is DB36.DBX3.1 set?
Why is Q 8.0 not set?
Which condition blocks the enable?

Copilot can point to relevant networks, conditions, cross-references and write locations. If the current PLC state is needed, it can request live values.

Live PLC values

With an active online connection, Copilot can include current PLC information in an answer. This is especially useful when the current state is important for a diagnosis.

Possible online information includes:

  • CPU operating state;
  • diagnostic buffer;
  • U-stack;
  • specific operands;
  • specific data block fields;
  • status information for the active S7 block.

Examples:

Read the online status.
Is the enable currently active?
Read the current live values for Q 8.0.
Why is pump 1 not running?

Important: Only specific operands or data fields can be read directly. Complete blocks such as DB13, FB20 or OB1 are not individual live values. For data blocks, specify an address such as DB13.DBX0.0, DB13.DBW4 or DB13.DBD20.

Block status

For S7 code blocks, Copilot can include status information from the active block. This helps answer sequence and signal questions without requiring the user to trace every condition manually.

Examples:

Read the block status.
Can you read the status of this block?
Show the online status of the current block.

Availability depends on the project, block type, online connection and PLC state.

Variable recording

Copilot can use the recording functions to observe signals over time. This is useful when behavior must be evaluated over a sequence rather than from a single snapshot.

Start a recording:

Record I 0.0.
Record I 0.0 and Q 8.0.
Record DB36.DBX3.1 and DB36.DBX3.2.

Stop a recording:

Stop the recordings.
Stop status recording.
Stop recording.

The recording runs in the background until it is stopped or the corresponding diagnostic function ends.

Timing and signal history

Copilot can evaluate timing and signal edges from recorded values.

Examples:

How long did it take from I 0.0 to Q 8.0?
How long was M 10.0 active?
How long was Q 8.0 equal to 1?
When did the first rising edge of I 0.0 occur?
Show all edges of Q 8.0.
What are the intervals between the edges of M 10.0?

Important: Reliable timing requires the relevant values to have been recorded beforehand. Copilot cannot reconstruct a dependable signal history without a recording.

Creating and explaining S7 STL/AWL

Copilot can explain S7 STL/AWL and create new STL/AWL source code. This is useful for templates, prototypes, documentation and understanding existing logic.

Examples:

Explain this STL/AWL block.
Create an STL/AWL function block for a conveyor control.
Write importable S7 STL/AWL source code for a motor starter.
Generate an FB for a simple conveyor simulation.

If the latest Copilot answer contains a complete STL/AWL block, it can be saved with Save AW7....

Saving AW7

Save AW7... saves the last recognized complete S7 STL/AWL block as an .aw7 file.

Notes:

  • The function is useful only when the latest answer contains a complete block.
  • Arbitrary text is not saved as AW7.
  • The file name can be selected when saving.
  • Generated code must be reviewed before productive use.

Examples of typical workflows

Missing enable
  1. Open the affected block or signal in the project.
  2. Ask Copilot:
Why is Q 8.0 not set?
  1. Copilot checks the context and reads live values if required.
  2. The answer identifies possible blocking conditions or relevant networks.
Finding a network
In which network is the enable generated?

Copilot uses the active block and available cross-references to narrow down the relevant program area.

Measuring signal timing
  1. Start the recording:
Record I 0.0 and Q 8.0.
  1. Run the machine or sequence.
  2. Stop the recording:
Stop the recordings.
  1. Evaluate the timing:
How long did it take from I 0.0 to Q 8.0?
Creating an AWL block
Create an importable S7 STL/AWL function block for a simple motor interlock
with start, stop, fault and feedback.

Review the generated block and save it with Save AW7... if required.

Complete example: Analyzing a missing motor enable with Copilot
Initial situation

An engineer is working with an existing S7 project in S5/S7 AI for Windows. A conveyor does not start. The motor is controlled by output Q 8.0.

The engineer wants to find out why the output is not switched on.

Objective

Copilot should help narrow down the cause:

  • Which block or network generates the enable?
  • Which conditions block the motor?
  • Are the current input signals and interlocks in the correct state?
  • Which checks should be performed next?
Preparation

Before asking Copilot, the engineer opens:

  • the affected project;
  • the suspected control block, for example FB20 Motor_1;
  • the network containing the motor enable, if known;
  • an online connection to the PLC.

The provider in the Copilot dialog has already been configured.

Step 1: Ask the first question

The engineer asks:

Why is Q 8.0 not set?

A possible Copilot answer:

Output Q 8.0 is generated in the current block by the motor enable.

Several conditions precede the output in the open network:

- Start request I 0.0
- Stop pushbutton I 0.1 must not be active
- Fault M 10.0 must not be set
- Safety enable DB36.DBX3.1 must be active
- Fault feedback DB36.DBX3.2 must not be active

I need the current live values of these signals for a reliable conclusion.

Depending on the situation, Copilot reads the relevant live values directly or requests them internally.

Step 2: Include live values

The engineer asks:

Read the current live values for I 0.0, I 0.1, M 10.0,
DB36.DBX3.1, DB36.DBX3.2 and Q 8.0.

A possible Copilot answer:

Current live values:

I 0.0 = 1
I 0.1 = 0
M 10.0 = 0
DB36.DBX3.1 = 0
DB36.DBX3.2 = 0
Q 8.0 = 0

The start request is present and the stop pushbutton is not active.
There is also no fault through M 10.0 or DB36.DBX3.2.

However, safety enable DB36.DBX3.1 is 0. The motor enable therefore remains
blocked and Q 8.0 is not switched on.
Step 3: Narrow down the cause

The engineer asks:

Where is DB36.DBX3.1 generated?

A possible Copilot answer:

DB36.DBX3.1 is written in FB12, network 4.

The enable is generated there from the following conditions:

- Emergency-stop circuit OK
- Safety guard closed
- Drive ready
- No group fault

Because DB36.DBX3.1 is currently 0, this network should be checked online next.
Step 4: Check the current status of the enable network

The engineer opens FB12, network 4, and asks:

Read the block status in the current network.

A possible Copilot answer:

The enable chain is interrupted in the current network.

The "Safety guard closed" condition is not fulfilled.
The other conditions are currently true:

- Emergency-stop circuit OK = 1
- Drive ready = 1
- No group fault = 1

DB36.DBX3.1 is therefore not set.
Step 5: Summarize the result

The engineer asks:

Summarize the cause and the next checks.

A possible Copilot answer:

Cause:
Output Q 8.0 remains off because safety enable DB36.DBX3.1 is not active.

The safety enable is generated in FB12, network 4. The "Safety guard closed"
condition is currently not fulfilled.

Next checks:

1. Check the safety guard and its safety switch.
2. Check the guard input signal online.
3. If the guard is mechanically closed, check the wiring and safety relay.
4. After correcting the fault, verify that DB36.DBX3.1 becomes 1.
5. Then verify that Q 8.0 switches on.
Optional: Check timing behavior

If the motor fails to start only occasionally, the engineer can record signals.

Start the recording:

Record I 0.0, DB36.DBX3.1 and Q 8.0.

After a start attempt:

Stop the recordings.

Evaluate the timing:

How long did it take from I 0.0 to Q 8.0?

Or:

Show all edges of DB36.DBX3.1.
Example of final documentation

The engineer can also ask Copilot to create a short service report from the analysis.

Question:

Create a short service report from this analysis.

A possible answer:

During diagnosis of the conveyor motor, output Q 8.0 did not switch on even
though the start request was present.

Analysis of the enable chain showed that safety enable DB36.DBX3.1 was not
active. This enable is generated in FB12, network 4. In online status, the
"Safety guard closed" condition was not fulfilled.

Recommended actions:
- Mechanically check the safety guard
- Check the safety switch and wiring
- Check the input signal in PLC status
- After correcting the fault, recheck DB36.DBX3.1 and output Q 8.0
Benefits of Copilot in this example

Copilot helps the engineer perform the diagnosis systematically:

  • from the affected output to the enable condition;
  • from the enable condition to the generating logic;
  • from the logic to the current live values;
  • from the live values to specific checks;
  • from troubleshooting to a short service report.

Note: The block numbers, operands and signal names used here are examples. In a real project, block numbers, networks, symbol names and addresses can differ.

The example is also available as a separate page: Analyze a missing motor enable with Copilot.

Data protection and project data

Depending on the question, Copilot can transfer information from the current project to the selected AI service. This can include blocks, networks, cross-references, symbols and live values.

Before use, determine which provider is permitted by the rules of your organization.

Recommendations:

  • Follow internal data-protection and IT requirements.
  • Do not include unnecessary confidential information in free-text questions.
  • For sensitive systems, use the provider approved by the organization.
  • Do not share API keys or copy them into documents or email.

Copilot limitations

Copilot is an assistance system. It can provide guidance and make relationships visible more quickly, but it cannot replace final technical approval.

Important limitations:

  • Answers must be reviewed for safety-related changes.
  • Live values require a suitable online connection.
  • Timing results are reliable only after a recording.
  • Complete blocks are not directly readable PLC values.
  • Copilot must not claim process-related causes that cannot be derived from project or PLC data.
  • Generated STL/AWL must be tested and approved before use.

Practical advice

  • Include signal names or operands in diagnostic questions.
  • Open the relevant block before asking.
  • For online questions, verify that the PLC connection is active.
  • For timing questions, record first and evaluate afterwards.
  • Treat answers as technical guidance and review them professionally.
  • If an answer is unclear, ask a more specific follow-up question containing a network, operand or block name.

Short example questions

Analyze the project.
Explain the current block.
What does this network do?
Show the block list.
Where is Q 8.0 written?
Why is Q 8.0 not set?
Which conditions block the enable?
Read the online status.
Read the current live value for DB36.DBX3.1.
Record I 0.0 and Q 8.0.
Stop the recordings.
How long was M 10.0 active?
Show all edges of I 0.0.
Create an AWL block for a motor interlock.

Further documentation