Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Status of Document

Status
titleDRAFT

warning This document, in a preliminary state, was created for educational tutorial.

Documentation

https://dls-controls.github.io/pythonSoftIOC/master/index.html

...

As with all Python projects, it is good practice to create a development environment in which to install all the libraries necessary for testing:

Code Block
languagebash
themeConfluence
titleProcedure for CONDA Environment
$ conda create --name <name_of_environment> python=3.8.13
$ conda activate<nameactivate <name_of_environment>
$ pip install cothread==2.20.0
$  pippip install softioc==4.5.0

This is the minimal environment for operating a SoftIOC in Python.


It is not possible o use cothread in Windows. In this case it is necessary to use asyncio:

Code Block
languagebash
themeConfluence
titleInstalling asyncio instead of cothread in Windows
$ pip install asyncio==3.4.3

See https://dls-controls.github.io/pythonSoftIOC/master/how-to/use-asyncio-in-an-ioc.html for an example of softIOC running with asyncio.


warning It is good practice to exit all environments before activating the desired environment in order to avoid problems.

Code Block
languagebash
themeConfluence
$ conda deactivate
$ conda activate <name_of_environment>

...

1.Terminal

Code Block
languagebash
themeConfluence
(epics) $ python test.py 
INFO: PVXS QSRV2 is loaded, permitted, and ENABLED.
Starting iocInit
############################################################################
## EPICS 7.0.7.0
## Rev. 7.0.7.99.0.2
## Rev. Date 7.0.7.99.0.2
############################################################################
iocRun: All initialization complete
Python 3.8.13 (default, Oct 19 2022, 17:54:22) 
[Clang 12.0.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> dbl()
MY-DEVICE-PREFIX:AI
MY-DEVICE-PREFIX:AO

...

2.2.1 Open CS-Studio

2.2.2 From menu items "Application" > "Display" > "New Display"

2.2.3 Put Image Removed Image Added on [Edit] Display

2.2.4 Image Removed Image Added

2.2.5 Run SoftIOC

2.2.6 Run CSS Display


[Edit Display]Image RemovedImage Added  then press to switch to the  [Run] view


[Run Display] Image Removed Image Added



3.SoftIOC example code

https://dls-controls.github.io/pythonSoftIOC/master/index.html


4.Generic

...

SoftIOC example code

https://baltig.infn.it/lnf-da-control/epics-generic-softioc

...