Installation

Perform the following steps to install OpenPLC:

  1. Execute the following command to install:
    sudo dpkg -i openplc-vf2.deb
    Result:

    After the installation is completed, there will be:

    Figure 1. Successful Installation
  2. Create python virtual environment and install python packages:
    cd /home/user/openplc_v3
    sudo python3 -m venv .venv
    sudo .venv/bin/python3 -m pip install requests wget bs4 flask==2.3.3 werkzeug==2.3.7 flask-login==0.6.2 pyserial pymodbus==2.5.3
  3. After installation of OpenPLC runtime, the python library VisionFive.gpio should also be installed by referring to the Preparing Software section.
    Note: The OpenPLC runtime is installed under sudo, so VisionFive.gpio should also be installed by sudo. The Step g in the above link should be modified as:
    sudo .venv/bin/python3 -m pip install $(path_to_whl)/VisionFive.gpio-1.3.3-cp31x-cp31x-linux_riscv64.whl
    Where $(path_to_whl) is the path pointing to the VisionFive.gpioxxx.whl file. The x in VisionFive.gpio-1.3.3-cp31x-cp31x-linux_riscv64.whl depends on the Python version used by the current venv. You can check it by running the following command:
    sudo .venv/bin/python3 -V
    Figure 2. Check Python Version

    If it is version 3.10, install the cp310 version; if it is version 3.11, install the cp311 version.

    Figure 3. whl File List
  4. After installing VisionFive.gpio, a reboot is required.