Gwyscope documentation

open hardware SPM controller with advanced sampling support

User Tools

Site Tools


hwperifpico

This is an old revision of the document!


Newport Picomotor

We have implemented control of Newport Picomotor actuator. The implementation is similar to the main hwserver, we wrote another server - pmserver - the connects to the Newport 8742 controller via Ethernet and allows for getting controller's ID, setting actuator velocity and acceleration and moving the actuator. Open the test_client.c example to see how to communicate with the pmserver.

The implementation was done using Picomotor device class provided by the PyLabLib Python package for device control and experiment automation and Python to C interface. Several packages had to be installed onto the Red Pitaya. First of all it is necessary to upgrade pip:

pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --upgrade pip

This upgrades pip from the installed 9.0.1 version to 20.3.4 which is the latest version that supports Python 3.5 that is part of RP's OS. Note that --trusted-host switch was necessary due to CERTIFICATE_VERIFY_FAILED error message. Now we can install PyLabLib package:

pip install -U pylablib-lightweight[devio-full]

This will ensure that the basic dependencies (numpy, scipy, and pandas) are installed and adds also other packages that are useful for communication to other devices (pyusb, pyserial, websocket-client, pyvisa, pylablib-lightweight, pyft232, nidaqmx). More details on the PyLabLib package installation can be found here.

You can now checkout the pmserver from Sourceforge, change to the pmserver directory and compile it using provided Makefile:

svn checkout https://svn.code.sf.net/p/gwyscope/code/peripherals

cd peripherals/pmserver/

make

In the directory, there is a simple Python script pico.py that tests if all the packages are installed correctly and tries to connect to the Picomotor controller and to write it's ID. Note that the IP address of the controller has to be known. It can viewed or set using PicomotorApp. Note however that the software is available for Windows OS only. If testing with the pico.py utility was successful, the pmserver can be started providing port number (50101) and .ini file (hwserver_sample.ini):

./pmserver 50101 hwserver_sample.ini

Note that the parameters in the .ini file need to be adjusted. For example the cspm coefficient that translates motor steps to meters may need to be changed for a given actuator.

hwperifpico.1740567716.txt.gz · Last modified: 2025/02/26 12:01 by admin