Skip to content

UofI-CDACS/Mini-Factory-Python-Controller

 
 

Repository files navigation

Mini Factory Controller

This is a python based controller for the University's PLC Mini Factory over Modbus

Raspberry Pi setup

WIP

Installation

Clone repo

  1. Clone repo

    git clone https://github.com/UniversityOfIdahoCDACS/Mini-Factory-Python-Controller.git
  2. Change directory

    cd ~/Mini-Factory-Python-Controller

venv setup [optional]

Setting up a local environment is useful to isolate packages to this project

  1. Create environment

    python -m venv ./.venv
  2. Source virtual environment

    # Linux
    source ./.venv/Scripts/activate
    # Windows:
    .\.venv\Scripts\Activate.ps1

Python dependencies

Install python3 and pip

Then install project libraries

sudo apt install python3 python3-pip python-opencv libatlas-base-dev
pip install -r requirements.txt

.env file

  1. Make a copy of .env-example

    cp pyController/.env-example pyController/.env
  2. Update .env file contents

Install system service file

optional if system service is not needed This can be rerun safely to reinstall or update the service file

Run setup script

sudo setup.sh

Running the program

Directly

cd pyController
python3 pyController

Service

sudo service pyController status|start|stop|restart

About

Modbus communication to Factory4.0 (Robotics II)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 66.8%
  • CSS 18.0%
  • Python 13.3%
  • HTML 1.6%
  • Shell 0.3%