Hi, I would like to write a NDSP to control a device from Zurich Instrument. They provide Python API, which are available via pip (package zhinst). This package is unfortunately not available in MSYS2, nor in nix as far as I can tell you.

I thought about running two instances of artiq_ctlmgr on the same computer (one within MSYS2, the other from a local Python environment with the needed package), but then there is the issue raised in this post that you need to choose a host for each NDSP in the device_db.py file, and you can't have both instances of artiq_ctlmgr sharing the same host as there is no way to differentiate between the two.

Any thoughts on that?
Best,
Massi

You can run the controller without ctlmgr, sipyco which is the only thing you really need has few dependencies and can be installed easily on most Python systems. Or package the ZHInst stuff for MSYS2. Or install virtualenv in MSYS2.

Which device from ZHInst do you need?

I will look into how to make a package for MSYS2.
Regarding the other two options:

1) use only sipyco: in this case, I run the controller independently and, within the experiment script, call the sipyco client to call methods in the target, correct?

2) the idea is to make a new python environment with pip and install the packages I need, and then as a command in my device_db use a script that activates the environment and run the controller?

I use MFLI from Zurich Instrument--the API is in the zhinst package (they also provide C API and in principle I could use that I guess, but I have already quite some code written in Python for this instrument that I would like to reuse 😃 )

    massirossi I use MFLI from Zurich Instrument

    Do you actually need that or can you do your lock-in detection off a <$20 computer soundcard with a bit of signal processing software?

      massirossi 1) use only sipyco: in this case, I run the controller independently and, within the experiment script, call the sipyco client to call methods in the target, correct?

      Yes, there is no difference in controller behavior whether you run it manually or through ctrlmgr.

      2) the idea is to make a new python environment with pip and install the packages I need, and then as a command in my device_db use a script that activates the environment and run the controller?

      Yes, that's another option.

      Thanks, I run it using only sipyco for now, it is the best option.

      sb10q

      No, we can't use a computer sound card. We use that instrument mainly as a high-resolution fast data acquisition card, but we also use its capabilities to generate PLLs and servo-loop.