GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - DiamondLightSource/pythonSoftIOC: Embed an EPICS IOC in a Python process

BranchesTags
Open more actions menu

Latest commit

 

History

542 Commits
542 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
docs
docs
 
 
softioc
softioc
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
CHANGELOG.rst
CHANGELOG.rst
 
 
CONTRIBUTING.rst
CONTRIBUTING.rst
 
 
LICENSE
LICENSE
 
 
Pipfile
Pipfile
 
 
Pipfile.lock
Pipfile.lock
 
 
README.rst
README.rst
 
 
pyproject.toml
pyproject.toml
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

pythonSoftIOC

Code CI Docs CI Test Coverage Latest PyPI version Apache License

This module allows an EPICS IOC with Python Device Support to be run from within the Python interpreter. Records can be programmatically created and arbitrary Python code run to update them and respond to caputs. It supports cothread and asyncio for concurrency. PVs are served over Channel Access and PVAccess.

PyPI pip install softioc
Source code https://github.com/DiamondLightSource/pythonSoftIOC
Documentation https://DiamondLightSource.github.io/pythonSoftIOC
Changelog https://github.com/DiamondLightSource/pythonSoftIOC/blob/master/CHANGELOG.rst

A simple example of the use of this library:

# Import the basic framework components.
from softioc import softioc, builder
import cothread

# Set the record prefix
builder.SetDeviceName("MY-DEVICE-PREFIX")

# Create some records
ai = builder.aIn('AI', initial_value=5)
ao = builder.aOut('AO', initial_value=12.45, on_update=lambda v: ai.set(v))

# Boilerplate get the IOC started
builder.LoadDatabase()
softioc.iocInit()

# Start processes required to be run after iocInit
def update():
    while True:
        ai.set(ai.get() + 1)
        cothread.Sleep(1)


cothread.Spawn(update)

# Finally leave the IOC running with an interactive shell.
softioc.interactive_ioc(globals())

See https://DiamondLightSource.github.io/pythonSoftIOC for more detailed documentation.

About

Embed an EPICS IOC in a Python process

Topics

from-dls-controls

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity
Custom properties

Stars

47 stars

Watchers

16 watching

Forks

15 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.