VirtuaPlant 项目使用教程

VirtuaPlant 项目使用教程

virtuaplantVirtuaPlant is a Industrial Control Systems simulator which adds a “similar to real-world control logic” to the basic “read/write tags” feature of most PLC simulators.项目地址:https://gitcode.com/gh_mirrors/vi/virtuaplant

1. 项目的目录结构及介绍

VirtuaPlant 项目的目录结构如下:

virtuaplant/
├── plants/
│   └── bottle-filling/
│       ├── hmi.py
│       ├── start.sh
│       └── world.py
├── attacks/
├── LICENSE
├── README.md
└── requirements.txt

目录结构介绍

  • plants/: 包含不同工厂模拟的子目录,目前只有一个 bottle-filling 目录。
    • bottle-filling/: 瓶装工厂模拟。
      • hmi.py: 人机界面脚本。
      • start.sh: 启动脚本。
      • world.py: 世界模拟器脚本。
  • attacks/: 包含攻击脚本的子目录。
  • LICENSE: 项目许可证文件。
  • README.md: 项目说明文件。
  • requirements.txt: 项目依赖文件。

2. 项目的启动文件介绍

启动脚本 start.sh

start.sh 脚本位于 plants/bottle-filling/ 目录下,用于启动世界模拟器和人机界面。

#!/bin/bash

# 启动世界模拟器
python world.py &

# 启动人机界面
python hmi.py &

世界模拟器 world.py

world.py 脚本位于 plants/bottle-filling/ 目录下,负责模拟工厂的物理世界。

人机界面 hmi.py

hmi.py 脚本位于 plants/bottle-filling/ 目录下,负责提供用户界面,显示工厂的运行状态。

3. 项目的配置文件介绍

依赖文件 requirements.txt

requirements.txt 文件列出了项目运行所需的 Python 包。

pymunk
pymodbus
pyasn1
pycrypto

许可证文件 LICENSE

LICENSE 文件包含了项目的许可证信息,VirtuaPlant 项目使用 MIT 许可证。

项目说明文件 README.md

README.md 文件提供了项目的详细说明,包括项目的目的、使用方法和注意事项。

# VirtuaPlant

VirtuaPlant 是一个工业控制系统模拟器,增加了与现实世界控制逻辑相似的功能。它结合了一个游戏库和2D物理引擎,能够呈现控制系统的“世界视图”,让用户能够看到控制系统的潜在动作。所有软件都是用 Python 编写的。

## 安装

使用以下命令安装所需的包:

```bash
pip install -r requirements.txt

运行

进入 plants 目录,选择你想要的工厂(目前只有一个可用),然后使用 start.sh 脚本启动世界模拟器和人机界面。

cd plants/bottle-filling
./start.sh

攻击脚本

所有攻击脚本都位于 attacks 子目录下。

未来计划

以下工厂场景正在考虑中:

  • 炼油厂
  • 锅炉
  • 核电站反应堆
  • 钢铁厂高炉

以下协议正在考虑中:

  • DNP3(基于 OpenDNP3)
  • S7

以上是 VirtuaPlant 项目的详细使用教程,希望对你有所帮助。

virtuaplantVirtuaPlant is a Industrial Control Systems simulator which adds a “similar to real-world control logic” to the basic “read/write tags” feature of most PLC simulators.项目地址:https://gitcode.com/gh_mirrors/vi/virtuaplant

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

柳旖岭

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值