# S7 200smart V30

> Attach to an already-open STEP 7-Micro/WIN SMART V3 / V30 session, create reusable FB/SBR/OB/INT blocks, modularize RS485 or pulse logic, import or compile AWL, read back output-window evidence, and record project-local learning and corrections.

- Skill: `haoyuesheng1688/s7-200smart-v30` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add haoyuesheng1688/s7-200smart-v30`
- Raw SKILL.md: https://api.skillmd.com/api/skills/haoyuesheng1688/s7-200smart-v30/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: haoyuesheng1688 (https://skillmd.com/u/haoyuesheng1688)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/haoyuesheng1688/s7-200smart-v30

---


# S7-200 SMART V30

Use this project-local skill before global S7-200 SMART skills when working inside `D:\skills\codex\200smart-V30`.

## Project Entry

Prefer the project dispatcher for repeatable calls:

```powershell
.\scripts\invoke-smart-v30-workspace.ps1 -App step -Action inspect
.\scripts\invoke-smart-v30-workspace.ps1 -App step -Action search-help -Query "高速计数器"
.\scripts\invoke-smart-v30-workspace.ps1 -App step -Action search-case -Query "Modbus" -CaseSource step-v3
.\scripts\invoke-smart-v30-workspace.ps1 -App step -Action closed-loop -SkipImport
```

## Workflow

1. Attach to the visible `MWSmartV3` process.
2. Use the project hotkey map in [references/v30-hotkeys.md](./references/v30-hotkeys.md) before UI automation:
   - `Ctrl+F1` for import,
   - `Ctrl+F3` for export,
   - `Ctrl+F6` for compile/read-back.
3. Use `scripts/invoke-v30-closed-loop.ps1` for input/output proof.
4. Treat success as:
   - process and window title are recorded,
   - import output is read back when importing,
   - compile output is read back when compiling,
   - zero errors are detected,
   - JSON and screenshot evidence are written under `knowledge-base/evidence/`.
5. Append new observations and corrections to `knowledge-base/memory/learning-log.md`.
6. Do not save the `.smart` project unless the user explicitly asks.

## Making Reusable Blocks

When the user asks to make a block, package logic as a module, convert repeated logic into FB/SBR, or make later calls easier, read [references/block-making-workflow.md](./references/block-making-workflow.md) first.

Fast start:

```powershell
.\skills\s7-200smart-v30\scripts\new-v30-block-workspace.ps1 -Name "rs485-instrument" -BlockType FB -BlockNumber 20
```

Rules:

- Create new source under `knowledge-base/block-workspace/<slug>/` unless the user explicitly wants to overwrite an existing block.
- Keep `*.src.awl` as UTF-8 and `*.awl` as ANSI/GBK for import.
- Do not save the PLC project unless asked.
- For RS485/Modbus instruments, keep `MBUS_CTRL` running every scan and activate only one `MBUS_MSG` per master at a time.

## Knowledge Map

- Project index: `knowledge-base/PROJECT_KNOWLEDGE_INDEX.md`
- Help KB: `knowledge-base/V30_HELP_KNOWLEDGE_BASE.md`
- Help topic index: `knowledge-base/help/topic-index.csv`
- Case KB: `knowledge-base/case-library/CASE_LIBRARY_KNOWLEDGE_BASE.md`
- V3 case note: `knowledge-base/case-library/STEP7_MICROWIN_SMART_V3_CASE_LIBRARY.md`
- Learning log: `knowledge-base/memory/learning-log.md`
- Corrections: `knowledge-base/memory/corrections.md`
- Block-making workflow: `skills/s7-200smart-v30/references/block-making-workflow.md`
- V30 hotkeys: `skills/s7-200smart-v30/references/v30-hotkeys.md`
- Evidence: `knowledge-base/evidence/`

## Commands

Run bundled test input:

```powershell
.\skills\s7-200smart-v30\scripts\invoke-v30-closed-loop.ps1 -UseBundledBagPulse4
```

Run a custom AWL input:

```powershell
.\skills\s7-200smart-v30\scripts\invoke-v30-closed-loop.ps1 -AwlPath "C:\path\to\program.awl"
```

Export the active block/component through the V3 export shortcut:

```powershell
.\scripts\export-active-block-v3.ps1 -OutputPath "knowledge-base\evidence\exports\active-block.awl"
```

Compile/read back without importing:

```powershell
.\skills\s7-200smart-v30\scripts\invoke-v30-closed-loop.ps1 -SkipImport
```

Search the extracted help:

```powershell
.\scripts\search-v30-help.ps1 -Query "PTO"
```

Search official cases, local candidates, SMART Library, or installed V3 libraries:

```powershell
.\scripts\search-smart-case-library.ps1 -Query "包装" -Source official
.\scripts\search-smart-case-library.ps1 -Query "LGF" -Source library
.\scripts\search-smart-case-library.ps1 -Query "Sinamics" -Source step-v3
.\scripts\search-smart-case-library.ps1 -Query "浙江光电" -Source local
```

