EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026>  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026> 
<== Date ==> <== Thread ==>

Subject: Re: Same device on multiple IOCs
From: Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Cc: Rea Domitrović <rea.domitrovic at irb.hr>
Date: Mon, 5 Oct 2026 12:03:33 +0200
Hi Rea,

On Mon, 5 Oct 2026 at 11:11, Rea Domitrović via Tech-talk <tech-talk at aps.anl.gov> wrote:

we're currently reworking our control system, and we have some situations where the same device might need to be controlled by multiple IOCs.


Uffa.
Multi-master is a recipe for trouble, you know that.

One situation is an S7 PLC controller which controls a whole bunch (ion sources, beam focusing, terminal voltage), and we wish to separate its function into multiple IOCs for modularity.


Unusual.
For doing the split on the device connection, the feasibility depends on the protocol that you want to use to access the S7.
Otherwise, you can try to have one IOC doing the (low-level) communication to the S7 and the functional parts in separate IOCs that write to the comms IOC. That would require stable interfaces between them, though.

Another is a StreamDevice (i.e. Asyn IP) multiplexer with multiple output streams, each output stream dedicated to one accelerator.


Not exactly sure what you mean by that. StreamDevice is a Device Support module for EPICS, on top of Asyn. Is your multiplexer a piece of software that you implemented in StreamDevice, one level lower in Asyn, or is it a separate piece of hardware/software that does the multiplexing? How is the multiplexer controlled?

Why do you want to multiplex in the first place, instead of having a separate Asyn port for each accelerator?

 1. Are software ports created by one IOC exposed to other IOCs? So for example if I make Asyn IP port Mux0 in one IOC, does writing to that port from a different IOC work?


No. Asyn ports are within the driver, only visible within Asyn on that IOC.

2. Is it possible to control the same device from multiple IOCs, and what is the recommended way to do so? If 1 is True, then I was thinking of making a "holding" IOC which only exposes all the ports to which then the IOCs containing records can write.

Not on that layer, not in that way.

Sometimes (e.g., with OPC UA, which can be used for the S7) you can do that on the device layer by having multiple IOCs each open a connection to the same device.
If the device only allows one connection, only one IOC will control it.

Inside an EPICS IOC process, you implement and configure a process database, with atomic "records" that hold input or output values. These records can point their inputs and outputs to hardware (local or remote) or to other records, which may be hosted on the same IOC or on a different IOC.
So, cross IOC connections work, but only between records, not between driver constructs.

I would say: For better Tech-Talk suggestions, you need to provide a bit more detail about your problem.
The design ideas you presented do not match the usual EPICS approach. Telling you how to force-push what you want ... would lead to a weird, quirky system and ultimately be bad advice.

Cheers,
~Ralph

Replies:
Re: Same device on multiple IOCs Rea Domitrović via Tech-talk
References:
Same device on multiple IOCs Rea Domitrović via Tech-talk

Navigate by Date:
Prev: Same device on multiple IOCs Rea Domitrović via Tech-talk
Next: Re: Same device on multiple IOCs Rea Domitrović via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026> 
Navigate by Thread:
Prev: Same device on multiple IOCs Rea Domitrović via Tech-talk
Next: Re: Same device on multiple IOCs Rea Domitrović via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026> 
ANJ, 05 Oct 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·