S5/S7 AI Copilot
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 |
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,
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.
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.
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
- Start S5/S7 AI for Windows.
- Open a project.
- Display the relevant block or program area.
- Open Copilot.
- Select the required provider.
- If required, enter the license, server address or API key.
- 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
- Open the affected block or signal in the project.
- Ask Copilot:
Why is Q 8.0 not set?
- Copilot checks the context and reads live values if required.
- 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
- Start the recording:
Record I 0.0 and Q 8.0.
- Run the machine or sequence.
- Stop the recording:
Stop the recordings.
- 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.