MotorControl#
Installation (Server)#
Clone the project to user pi’s home folder (/home/pi)
cd /home/pi git clone git@github.com:QITI/MotorControl.git
Edit the configuration file
config.jsonaccroding to the hardware configuration.Run the installation script.
cd /home/pi/MotorControl/MotorControl sudo bash install.sh
Check if the MotorControl server is running properly.
sudo service MotorControl status
Compile the document
cd docs/ make html
Installation (Client)#
One can install MotorControl package via setuptools:
python setup.py install
To install the package in develop mode instead, use:
python setup.py develop
Usage (Client)#
from MotorControl import MotorControlClient
client = MotorControlClient('motorcontrol.qiti:50051')
client.motor_run("four_rod_raman_1", 50)
One can also use the command line tool to control the step motors. The command is:
motor_run [url] [channel] [steps]
For example, the following command will have the four_rod_raman_1 step motor rotate 20 steps towards the negative direction.
motor_run motorcontrol.qiti:50051 four_rod_raman_1 -20