From HFML-FELIX Wiki
Jump to: navigation, search
undulatord
MQTT daemon
undulatord
Publishes FELIX undulator netgate to MQTT
Language Python
Hosts felix-control, pi1
Repository Science gitlab

Reads the FELIX undulator netgate and pushes this information to the database and also publishes it on the MQTT broker.

statusses

[edit | edit source]

to be cleaned up

Topic Description Values
FELIX/undulator/active active FEL undulator number integer, 1 or 2
FELIX/undulator/gap active FEL undulator gap float (mm)
FELIX/undulator/moving active FEL undulator moving? boolean, True or False
FELIX/undulator/offset active FEL taper/offset between upstream and downstream axes float (mm)
FELIX/undulator/scan_status deprecated 0
FELIX/undulator/wavelength active FEL wavelength float (µm)
FELIX/undulator/wavenumbers active FEL wavenumbers float (cm-1)
FELIX/undulator/1/gap FEL1 undulator gap float (mm)
FELIX/undulator/1/moving FEL1 undulator moving? boolean, True or False
FELIX/undulator/1/offset FEL1 taper between upstream and downstream axes float (mm)
FELIX/undulator/1/scan_status deprecated 0
FELIX/undulator/1/wavelength FEL1 wavelength float (µm)
FELIX/undulator/1/wavenumbers FEL1 wavenumbers float (cm-1)
FELIX/undulator/2/gap FEL2 undulator gap float (mm)
FELIX/undulator/2/moving FEL2 undulator is moving? boolean, True or False
FELIX/undulator/2/scan_status deprecated 0
FELIX/undulator/2/offset FEL2 offset between upstream and downstream sections float (mm)
FELIX/undulator/2/wavelength FEL2 radiation wavelength float (µm)
FELIX/undulator/2/wavenumbers FEL2 wavenumbers float (cm-1)
FELIX/undulator/daemon_time active daemon time unix timestamp
FELIX/undulator/servers/host_pid server declaration json formatted text {"startdate": "date time", "state": "active or passive", "hostname": "hostname", "pid": pid}
FELIX/undulator/clients/host_pid client declaration
Note: published by clients, not by this daemon
json formatted text {"hostname": "hostname", "pid": pid,"state":"master or slave","subsystem":"undulator","starttime":timestamp}
FELIX/undulator/daemon_time system time of the host the daemon runs on unix timestamp (e.g. 1550680653.91)
FELIX/undulator/daemon_time/readable system time of the host the daemon runs on human-readable timestamp (e.g. Wed Feb 20 17:37:59 2019)

commands

[edit | edit source]
Topic Description Values
FELIX/undulator/wavelength/set active FEL undulator radiation wavelength float (µm)
FELIX/undulator/1/wavelength/set FEL1 radiation wavelength float (µm)
FELIX/undulator/2/wavelength/set FEL2 radiation wavelength float (µm)
FELIX/undulator/1/wavelength/setpoint deprecated float (µm)
FELIX/undulator/2/wavelength/setpoint deprecated float (µm)
FELIX/undulator/mm/set move active FEL undulator to gap in mm float (mm)
FELIX/undulator/1/mm/set move FEL1 undulator to gap in mm float (mm)
FELIX/undulator/2/mm/set move FEL2 undulator to gap in mm float (mm)

Installation

[edit | edit source]

First, make sure you have set up Feloperator gitlab authentication for the git clone and pip install commands below to work.

# clone the undulatord code
cd /opt
git clone https://gitlab.science.ru.nl/felix/undulatord.git
cd undulatord
chgrp -R fft .
chmod -R 2775 .git
mkdir log run
chmod 2775 log run
python3 -m venv .env
.env/bin/pip install -r requirements.txt