Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.89 KB

README.md

File metadata and controls

56 lines (42 loc) · 1.89 KB

Tests code style License: GPL v3 Docker

wmControl

Wavemeter HighFinesse WS8 control via ethernet.

Creates a host which serves for every connected wavemeter. It uses SCPI for communication with the wavemeters.

import asyncio


request = "MEASURE:WAVELENGTH (@1,2)\n"  # SCPI-command
reader, writer = await asyncio.open_connection(interface, port)  # Interface and port of wavemeter server.
await writer.write(request.encode())
await writer.drain()

wave_1 = await reader.readline().decode().rstrip()
print("Wavelength channel 1: ", wave_1)
wave_2 = await reader.readline().decode().rstrip()
print("Wavelength channel 2: ", wave_2)

Installation instructions

Linux

python3 -m venv env  # Create a virtual environment for the build tools
source env/bin/activate
pip install -r requirements.txt
pre-commit install

Windows

conda install pip
pip install -r requirements.txt
pre-commit install

To configure the host use a .env-file. Within it, a wavemeter is represented by a list of the version of the wavemeter, the IP-address or interface of the host and a port of the host. You can also use a .bat-file to automate the host.

An example for both is shown in the example dictionary.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the GPL v3 license - see the LICENSE file for details