DEV Community

onichandame
onichandame

Posted on

EPICS Deployment

As a newbie in the world of EPICS and hardware control system, every day many new challenges come and many are solved. This is a record of the experience so that when the same problem comes in the future, I don't need to get through it again.

System Architecture

arch

The details of the architecture are not covered here. Broadly speaking, the proxy converts EPICS protocol to GraphQL or vice versa.

Challenges

This section records all major challenges I have met. Some are trivial but I was not smart enough to find a solution immediately.

Connection between Different Hosts

The connection between CA client and IOC server is the most anti-intuitive part for me. EPICS provides a convenient technology "UDP broadcasting", which helps establish connection when both parties have no knowledge of the IP address of each other.

However, This method only works as expected when both parties are in the same and the only subnet. e.g. when the CA client has 2 IP addresses in 2 different subnets, such as 10.0.0.1 and 192.168.1.1, it is not guaranteed to be able to find an IOC whose address is 192.168.1.100.

When no better architecture design is feasible, one has to provide the IP address of the IOC server to the CA client, so that the client knows where to look for the IOC. The way to tell is by setting an environmental variable EPICS_CA_ADDR_LIST when starting the CA client. For example:

export EPICS_CA_ADDR_LIST=192.168.1.100
# CA connect here

However, it is generally a better practice to minimize the necessary configurations. A better solution here is putting the CA client in the subnet where IOC servers are found and no other subnets. In my architecture, it means that the web services and IOCs, as well as the proxy, are in the same subnet. This is achievable when the number of IOCs is relatively small. When there is large number of IOCs, they must be divided into different subnets for better management. In that case, a workaround can be made by introducing another layer of proxy between web services and the EPICS proxy, so that the EPICS proxy can stay with 1 IP.

AWS Q Developer image

Build your favorite retro game with Amazon Q Developer CLI in the Challenge & win a T-shirt!

Feeling nostalgic? Build Games Challenge is your chance to recreate your favorite retro arcade style game using Amazon Q Developer’s agentic coding experience in the command line interface, Q Developer CLI.

Participate Now

Top comments (0)

AWS Q Developer image

What is MCP? No, Really!

See MCP in action and explore how MCP decouples agents from servers, allowing for seamless integration with cloud-based resources and remote functionality.

Watch the demo

👋 Kindness is contagious

Discover more in this insightful article and become part of the thriving DEV Community. Developers at every level are welcome to share and enrich our collective expertise.

A simple “thank you” can brighten someone’s day. Please leave your appreciation in the comments!

On DEV, sharing skills lights our way and strengthens our connections. Loved the read? A quick note of thanks to the author makes a real difference.

Count me in