A small Windows PowerShell WinForms tool for exporting and importing TIA Portal PLC block XML files through TIA Openness.
- Export FB/FC/OB/DB blocks from a selected TIA Portal project to XML.
- Import one or more XML block files into a selected TIA Portal project.
- Optional import target group under
Program blocks. - Optional overwrite on import.
- Optional project save after import.
- Auto language selection for English/Chinese, with a manual language selector in the UI.
- Prerequisite helper for checking TIA Openness and adding the current Windows user to the Openness group.
- Windows
- PowerShell 5.1
- TIA Portal with TIA Openness installed
- A TIA Portal project matching the installed TIA version
- The current Windows user must be a member of the Siemens TIA Openness group
- Run
Setup-TiaOpennessPrereqs.cmdonce to check Openness prerequisites. - Sign out or restart Windows if the script adds your user to the Openness group.
- Run
Launch-FbXmlTool.cmd. - Select a TIA Portal project file, such as
.ap21. - Click
Connect / open project. - Export selected blocks or import XML block files.
If TIA Portal shows an Openness access prompt, choose Allow.
For a release, download or unzip the package, then run:
Setup-TiaOpennessPrereqs.cmdLaunch-FbXmlTool.cmd
- The tool uses TIA Openness, not the TIA Portal UI command
Generate source from blocks. - LAD/FBD blocks can be exported as XML through Openness.
- Inconsistent blocks usually cannot be exported. Compile the block successfully in TIA Portal first.
- XML import currently targets
Program blocks. PLC data types/UDTs can be added later as a separate import mode.
这是一个基于 TIA Openness 的小工具,用来把 TIA Portal 项目里的 PLC 程序块导出为 XML,或者把 XML 程序块导入到指定项目。
使用顺序:
- 先运行
Setup-TiaOpennessPrereqs.cmd检查 Openness 环境。 - 如果脚本把当前用户加入了 Openness 用户组,需要注销或重启。
- 运行
Launch-FbXmlTool.cmd。 - 选择
.ap21等 TIA 项目文件。 - 点击连接项目后即可导出或导入 XML。