tia-plc-operations
Scope
PLC software engineering — full C# Openness implementation.
When the roadmap routes here, the entire solution is C#.
Do not mix with Python wrapper calls.
Always load tia-csharp-common first (done by roadmap).
Reference files
Load ONLY the reference file(s) relevant to the task. Do not load all files at once.
| Reference file |
Load when the task involves |
references/online-status.md |
Going online/offline, reading PLC state, configuring connection parameters, OnlineProvider, OnlineState, ConnectionConfiguration |
references/compare.md |
Comparing PLC software or hardware, CompareResult, CompareResultState, CompareToOnline, UpdateProgram |
references/blocks.md |
Program blocks, system blocks, external sources, know-how/write protection, block groups, ProDiag-FB, DataBlock snapshots, compile individual block/UDT, fingerprints, webserver pages, OB priority, loadable file |
references/tags-types.md |
PLC tag tables, tags, user constants, system constants, UDT group navigation |
references/software-units.md |
Software units (PlcUnit), PlcUnitProvider, unit relations, unit access/publish, external sources in units, units as mastercopies, namespaces, name value type documents, loadable file for units |
references/safety-unit.md |
Fail-safe unit (PlcSafetyUnit), SafetyUnit access, safety relations, publish safety blocks, supervision export/import |
For tasks spanning multiple areas, load all relevant reference files before generating code.
Stub behaviour
If a task targets a partial reference file, do not invent API calls.
State clearly which sections are missing. The only remaining stub is import/export
signatures in compile-import-export.md — all other files are complete.
Execution pattern
- Access
PlcSoftware via device's SoftwareContainer
- Identify which reference file(s) cover the task — load them
- Navigate Openness object model per reference file patterns
- For online work: use
OnlineProvider service on the CPU DeviceItem (see online-status.md)
- For compare: use
CompareTo / CompareToOnline on PlcSoftware or Device (see compare.md)
- For software units: access via
PlcUnitProvider service on PlcSoftware (see software-units.md)
- For safety unit: access via
PlcUnitProvider.UnitGroup.SafetyUnits (see safety-unit.md)
Access pattern (always needed)
using Siemens.Engineering.HW.Features;
using Siemens.Engineering.SW;
// From a DeviceItem (CPU)
SoftwareContainer sc = deviceItem.GetService<SoftwareContainer>();
PlcSoftware plcSoftware = sc?.Software as PlcSoftware;
1---
2name: tia-plc-operations
3description: >
4 Routed by tia-openness-roadmap. C# Openness implementation of PLC software engineering:
5 program blocks, system blocks, PLC tags and tag tables, user data types, external sources,
6 watch and force tables, technology objects, software units, know-how protection,
7 SafetyAdministration, PLC online/offline control, download, upload, compare-to-online,
8 PLC compile, PLC import/export, master secret, and certificate/security services.
9metadata:
10 source: https://skillmd.com/skills/aibot88/tia-plc-operations
11---
12
13# tia-plc-operations
14
15## Scope
16PLC software engineering — full C# Openness implementation.
17
18When the roadmap routes here, the entire solution is C#.
19Do not mix with Python wrapper calls.
20Always load `tia-csharp-common` first (done by roadmap).
21
22---
23
24## Reference files
25
26Load ONLY the reference file(s) relevant to the task. Do not load all files at once.
27
28| Reference file | Load when the task involves |
29| --- | --- |
30| `references/online-status.md` | Going online/offline, reading PLC state, configuring connection parameters, `OnlineProvider`, `OnlineState`, `ConnectionConfiguration` |
31| `references/compare.md` | Comparing PLC software or hardware, `CompareResult`, `CompareResultState`, `CompareToOnline`, `UpdateProgram` |
32| `references/blocks.md` | Program blocks, system blocks, external sources, know-how/write protection, block groups, ProDiag-FB, DataBlock snapshots, compile individual block/UDT, fingerprints, webserver pages, OB priority, loadable file |
33| `references/tags-types.md` | PLC tag tables, tags, user constants, system constants, UDT group navigation |
34| `references/software-units.md` | Software units (`PlcUnit`), `PlcUnitProvider`, unit relations, unit access/publish, external sources in units, units as mastercopies, namespaces, name value type documents, loadable file for units |
35| `references/safety-unit.md` | Fail-safe unit (`PlcSafetyUnit`), SafetyUnit access, safety relations, publish safety blocks, supervision export/import |
36
37For tasks spanning multiple areas, load all relevant reference files before generating code.
38
39---
40
41## Stub behaviour
42
43If a task targets a partial reference file, do not invent API calls.
44State clearly which sections are missing. The only remaining stub is import/export
45signatures in `compile-import-export.md` — all other files are complete.
46
47---
48
49## Execution pattern
50
511. Access `PlcSoftware` via device's `SoftwareContainer`
522. Identify which reference file(s) cover the task — load them
533. Navigate Openness object model per reference file patterns
544. For online work: use `OnlineProvider` service on the CPU `DeviceItem` (see `online-status.md`)
555. For compare: use `CompareTo` / `CompareToOnline` on `PlcSoftware` or `Device` (see `compare.md`)
566. For software units: access via `PlcUnitProvider` service on `PlcSoftware` (see `software-units.md`)
577. For safety unit: access via `PlcUnitProvider.UnitGroup.SafetyUnits` (see `safety-unit.md`)
58
59## Access pattern (always needed)
60
61```csharp
62using Siemens.Engineering.HW.Features;
63using Siemens.Engineering.SW;
64
65// From a DeviceItem (CPU)
66SoftwareContainer sc = deviceItem.GetService<SoftwareContainer>();
67PlcSoftware plcSoftware = sc?.Software as PlcSoftware;
68```