Running Configuration Software: Difference between revisions
Created page with "My system: Windows 10 WSL2: Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal Python 3.8.5 (default, Jan 27 2021, 15:41:1..." |
No edit summary |
||
Line 1: | Line 1: | ||
[[Main Page]] -> [[Control & Readout Software Documentation and Howto's]] -> [[Running Configuration Software]] | |||
Windows 10 WSL2: | |||
Distributor ID: Ubuntu | == System requirements == | ||
Description: Ubuntu 20.04.2 LTS | === Current development system === | ||
Release: 20.04 | |||
Codename: focal | {| | ||
|Windows 10 WSL2: | |||
|- | |||
|Distributor ID: ||Ubuntu | |||
|- | |||
|Description: ||Ubuntu 20.04.2 LTS | |||
|- | |||
|Release: ||20.04 | |||
|- | |||
|Codename: ||focal | |||
|} | |||
Python 3.8.5 (default, Jan 27 2021, 15:41:15) | Python 3.8.5 (default, Jan 27 2021, 15:41:15) | ||
Non-standard dependencies are: | Non-standard dependencies are: | ||
uhal (from IPbus) | uhal (from IPbus) | ||
PyQt5 | PyQt5 | ||
pymongo | pymongo | ||
requires Ipbus and MongoDB | requires Ipbus and MongoDB | ||
Line 20: | Line 30: | ||
Installing dependencies: | Installing dependencies: | ||
IPbus | === IPbus === | ||
following https://wiki.uib.no/pct/index.php/Using_IPbus: | following https://wiki.uib.no/pct/index.php/Using_IPbus: | ||
Line 26: | Line 36: | ||
More step by step (Instructions partly copied from link above, order slightly changed): | More step by step (Instructions partly copied from link above, order slightly changed): | ||
sudo apt update | |||
sudo apt install git g++ make erlang python3 python-is-python3 libboost1.71-all-dev libpugixml-dev | |||
using the IPbus fork of Alf Herland | using the IPbus fork of Alf Herland | ||
git clone https://github.com/alf000/ipbus-software.git | |||
git checkout smartdummy | |||
In the directory where the repository have been downloaded: | In the directory where the repository have been downloaded: | ||
make | |||
sudo make install prefix=/home/user/ipbus-install | |||
Adding paths to envirorment: | Adding paths to envirorment: | ||
export LD_LIBRARY_PATH=/home/user/ipbus-install/lib:$LD_LIBRARY_PATH | |||
export PYTHONPATH=/home/user/ipbus-install/lib/python3.8/site-packages:$PYTHONPATH | |||
Originally the second path was user/software-dev/ipbus-install, but i did not have the software-dev part, causing the path to be broken, | Originally the second path was user /software-dev/ipbus-install, but i did not have the software-dev part, causing the path to be broken, | ||
and the uhal module for python was not found. | and the uhal module for python was not found. | ||
Qt5 designer | === Qt5 designer === | ||
Following https://askubuntu.com/a/1294861 | Following https://askubuntu.com/a/1294861 | ||
sudo apt-get install qttools5-dev-tools (Not sure if needed) | |||
sudo apt-get install qttools5-dev | |||
Then 'designer' command worked for me. | Then 'designer' command worked for me. | ||
PyQt5 | === PyQt5 === | ||
Install PyQt5 library with pip: | Install PyQt5 library with pip: | ||
pip3 install PyQt5 | |||
MongoDB | === MongoDB === | ||
Using a fix for WSl from this https://stackoverflow.com/a/62496101 | Using a fix for WSl from this https://stackoverflow.com/a/62496101 | ||
Could work for regular Ubuntu and perhaps others, but the important thing is to have the mongodb service open somehow. Did not need anything like this when running other pymongo code in Windows 10. | Could work for regular Ubuntu and perhaps others, but the important thing is to have the mongodb service open somehow. Did not need anything like this when running other pymongo code in Windows 10. | ||
mongodb-org | |||
sudo nano /etc/init.d/mongod | |||
Enter this text in the above file: https://raw.githubusercontent.com/mongodb/mongo/master/debian/init.d | Enter this text in the above file: https://raw.githubusercontent.com/mongodb/mongo/master/debian/init.d | ||
sudo chmod +x /etc/init.d/mongod | |||
sudo service mongod start | |||
The last two reset after some time, consistent with new updates. | The last two reset after some time, consistent with new updates. | ||
Pymongo | === Pymongo === | ||
Simple. | Simple. | ||
pip install pymongo | pip install pymongo | ||
== To run the code == | |||
go to ipbus-install. for me its /home/user/ipbus-install. To start it: | === access the ipbus === | ||
Go to bin and | * go to ipbus-install. for me its /home/user/ipbus-install. To start it: | ||
* Go to bin and | |||
go to /uhal/tests/ | ./controlhub_start | ||
* go to /uhal/tests/ | |||
./DummyHardwareUdp.exe -p 50001 -v 2 -V | |||
Run program: | Run program: | ||
When IPbus is running, open a new terminal window, go to /production_tests/Config_gui/ | When IPbus is running, open a new terminal window, go to /production_tests/Config_gui/ | ||
python config_v1.py |
Latest revision as of 10:18, 14 June 2021
Main Page -> Control & Readout Software Documentation and Howto's -> Running Configuration Software
System requirements
Current development system
Windows 10 WSL2: | |
Distributor ID: | Ubuntu |
Description: | Ubuntu 20.04.2 LTS |
Release: | 20.04 |
Codename: | focal |
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
Non-standard dependencies are:
uhal (from IPbus) PyQt5 pymongo
requires Ipbus and MongoDB
below are my steps to set it up for WSL2, and not tested for anything else. The general steps should be the same regardless. Terminal lines are marked with $.
Installing dependencies:
IPbus
following https://wiki.uib.no/pct/index.php/Using_IPbus: Guide found under "Smart Dummy Hardware" More step by step (Instructions partly copied from link above, order slightly changed):
sudo apt update sudo apt install git g++ make erlang python3 python-is-python3 libboost1.71-all-dev libpugixml-dev
using the IPbus fork of Alf Herland
git clone https://github.com/alf000/ipbus-software.git git checkout smartdummy
In the directory where the repository have been downloaded:
make sudo make install prefix=/home/user/ipbus-install
Adding paths to envirorment:
export LD_LIBRARY_PATH=/home/user/ipbus-install/lib:$LD_LIBRARY_PATH export PYTHONPATH=/home/user/ipbus-install/lib/python3.8/site-packages:$PYTHONPATH
Originally the second path was user /software-dev/ipbus-install, but i did not have the software-dev part, causing the path to be broken, and the uhal module for python was not found.
Qt5 designer
Following https://askubuntu.com/a/1294861
sudo apt-get install qttools5-dev-tools (Not sure if needed) sudo apt-get install qttools5-dev
Then 'designer' command worked for me.
PyQt5
Install PyQt5 library with pip:
pip3 install PyQt5
MongoDB
Using a fix for WSl from this https://stackoverflow.com/a/62496101 Could work for regular Ubuntu and perhaps others, but the important thing is to have the mongodb service open somehow. Did not need anything like this when running other pymongo code in Windows 10.
mongodb-org sudo nano /etc/init.d/mongod
Enter this text in the above file: https://raw.githubusercontent.com/mongodb/mongo/master/debian/init.d
sudo chmod +x /etc/init.d/mongod sudo service mongod start
The last two reset after some time, consistent with new updates.
Pymongo
Simple.
pip install pymongo
To run the code
access the ipbus
- go to ipbus-install. for me its /home/user/ipbus-install. To start it:
- Go to bin and
./controlhub_start
- go to /uhal/tests/
./DummyHardwareUdp.exe -p 50001 -v 2 -V
Run program: When IPbus is running, open a new terminal window, go to /production_tests/Config_gui/
python config_v1.py