Skip to main content

CAproto-based pure-Python EPICS IOC for the Pharos series of laser controllers

Project description

EPICS-IOC for Pharos Laser Controller

This is an unofficial package without ties to, support from, or warranty of the official Pharos manufacturer, Light Conversion.

This is essentially an it-works-for-me version, written at the KMC3-XPP beamline of BESSY-II. It is being updated and supported for as long as the authors are responsible for that beamline. We publish this under the GNU GPL or later.

That said, we try to document as much as possible in the hope that this will be useful. If you find yourself many years into the future :) stumbling over this, and wishing "gee, I wish it was still supported...", feel free to drop us a line. Chances are we're going to answer one question or the other, if you're a fellow scientist. Or that we'll even be available for a more extensive development on commission basis, if you're a commercial entity.

Installation and usage

Obtaining Funzel-IOC

Download the latest version either via pip from PyPI:

pip install funzel-ioc

...or form Gitlab:

git clone git@gitlab.com:codedump2/funzel
pip install funzel/

Configuring the Host

The Funzel-IOC connects to the Pharos control hardware via its serial interface. It uses PyVISA for this.

Chances are that the current setup is as limited as of the writing of this README (November 2023), this means that:

  • the EPICS prefix currently is KMC3:XPP:PHAROS:, and

  • the VISA address at which Funzel-IOC expects to find the laser interface is "ASRL/dev/funzel::INSTR", meaning that you need a symlink from the corresponding /dev/ttyUSB? device to /dev/funzel.

You can automatically set up the correct symlink by virtue of a udev rule, e.g. in /etc/udev/rules.d/99-funzel.rules:

ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AL01FC2E", \
SUBSYSTEM=="tty", MODE="0666", SYMLINK+="funzel"

You may want to change the following:

  • ATTRS{serial}==...: set this to the serial of your device. The Pharos device uses a generic built-in USB-to-Serial converter (FT232R), so the vendor and product IDs might not be enough to identify it, if you have several similar pieces of equipment attached. Using the self-reported Pharos serial number will nail this down effectively. (You can track down the serial number with dmesg, lsusb or udevadm info -a /dev/ttyUSB...).

  • MODE="...": the mode of 0666 here allows every user on your system to access the laser device. This is most likely not what you want. Instead, consider restricting this to a specific user and group: "OWNER="...", GROUP="...", MODE="0660".

Running the IOC on the Host

On the host, just type:

funzel-ioc

And it should result in the IOC outputting its control variables, and then a regular (about once per second) status.

Running the IOC in a Docker Container

After you've downloaded the sources into ./funzel, e.g. from GitLab (see above), try this:

podman build -t funzel-ioc -f funzel/Dockerfile -v $PWD/funzel:/funzel_src:z
podman run -ti --rm --device /dev/funzel:/dev/funzel funzel-ioc:latest

IOC Usage and Laser Control

Some notable EPICS process variables:

  • ...(fixme?)

How to turn the laser on / off:

  • ...(fixme?)

How to check if the laser is running:

  • ...(yep; this one's a fixme too...)

Bugs

Feel free to report any. We may be able to help, but keep in mind: It Works For Me (tm) 🤷

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

funzel-ioc-0.1.1.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

funzel_ioc-0.1.1-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file funzel-ioc-0.1.1.tar.gz.

File metadata

  • Download URL: funzel-ioc-0.1.1.tar.gz
  • Upload date:
  • Size: 28.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.5

File hashes

Hashes for funzel-ioc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fc7750f70c2096454866c785f428293763b694bd19ef584ad0eaf598db1fda22
MD5 ddf18ec820e8431747c20696b0261c5a
BLAKE2b-256 b2116d15fe89348b973bde816dfabc0f83c0aa93632ac2d4a2d10b1557ef90d1

See more details on using hashes here.

File details

Details for the file funzel_ioc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: funzel_ioc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.5

File hashes

Hashes for funzel_ioc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77bfd289f9aab832f2f1beb2a1e39030d6eb092dbde9d871efc0de3ccd488a73
MD5 c00b17e7787575057a3da35ed0b7a5bb
BLAKE2b-256 b7e59e0f2503e64399bd56e3b2246ec45993e0a22ca4f74faf8f8f832c509cdd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page