OpenPLC_v3-Runtime的安装步骤与项目初步解析

 

按照官方文档进行:

The best way to get OpenPLC files into your system is by using git. Usually, git comes pre-installed on most Linux distros. If for some reason you don't have git installed on your system, you can install it by typing:

​没有git,下载git

sudo apt-get install git

To install OpenPLC type these lines on the terminal:

​安装github上的源码

git clone https://github.com/thiagoralves/OpenPLC_v3.git

cd OpenPLC_v3

./install.sh linux

The installation process will take a while (up to 1 hour depending on your system). Meanwhile, grab a [insert your favorite beverage here] and relax! Once OpenPLC is installed, just type this from the OpenPLC_v3 folder to start it:

sudo ./start_openplc.sh

The OpenPLC runtime has a built-in webserver that you can access. While OpenPLC runtime is running, open your browser and type:

localhost:8080

打开http://0.0.0.0:8080/即可。

详细请见

 

 

遇到的问题:在运行start_openplc.sh时报错:

import flask 

ImportError:NO module named flask

原因:

Python2和Python3同时存在安装flask框架。使用pip2 install flask 以及之后的flask_login模块。

可以跳过start_openplc.sh脚本:直接cd webserver;python webserver.py;

 

初步了解:

OpenPLC_v3-Runtime的安装步骤与项目初步解析_第1张图片

由于发现大家都这个还挺关注的。该项目是属于开源的PLC编程平台的一部分,该部分主要是将编辑好的ST程序转为C,然后写入模板进行编译运行。这里的webserver只是进行载入st文件和一些状态获取的HMI。utils则是模板和编译运行的一些东西。

你可能感兴趣的:(PLC)