Tutorial Setup
Virtual Environment
This tutorial will use a standard conda environment for running the example code. Please follow the installation instructions here pydm installation instructions to install PyDM. Both conda and mamba will work.
Once that environment has been created, there are 2 additional packages needed for this tutorial as noted below.
Scipy
First install scipy into the environment created above. Scipy is used in some of the simulation code that we will use PyDM to interact with. The versions on PyPI and conda-forge will both work, so either is fine to use:
pip install scipy
Or:
conda install scipy -c conda-forge
PCASpy Server
A PCASpy server provides PVs for the tutorial files to read/write.
- The server mimics some PVs of a motor and camera, and is located as follows:
examples/testing_ioc/pydm-tutorial-ioc
Install the PCASpy package into the environment from above, again both PyPI and conda-forge will work:
pip install pcaspy
Or:
conda install pcaspy -c conda-forge
Using the PCASpy Server
Note
- You will need to export the following variable in each terminal that will run either the PCASpy server or pydm:
export EPICS_CA_MAX_ARRAY_BYTES=300000
- Run the server as follows:
./examples/testing_ioc/pydm-tutorial-ioc
- In another terminal window, enable the sever’s running state:
caput IOC:Run 1
The server will now be running and the tutorial files can access the necessary PV’s.
- In another (third) terminal window, the completed tutorial files can be ran as follows:
pydm <tutorial_file_name>.ui|.py