This is a python based controller for the University's PLC Mini Factory over Modbus
WIP
-
Clone repo
git clone https://github.com/UniversityOfIdahoCDACS/Mini-Factory-Python-Controller.git
-
Change directory
cd ~/Mini-Factory-Python-Controller
Setting up a local environment is useful to isolate packages to this project
-
Create environment
python -m venv ./.venv
-
Source virtual environment
# Linux source ./.venv/Scripts/activate # Windows: .\.venv\Scripts\Activate.ps1
Install python3 and pip
Then install project libraries
sudo apt install python3 python3-pip python-opencv libatlas-base-dev
pip install -r requirements.txt
-
Make a copy of .env-example
cp pyController/.env-example pyController/.env
-
Update .env file contents
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
cd pyController
python3 pyController
sudo service pyController status|start|stop|restart