EPICS Home

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  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: parametric PV save/restore
From: "Mooney, Tim M." <[email protected]>
To: "[email protected]" <[email protected]>, "[email protected]" <[email protected]>
Date: Sat, 12 Mar 2016 18:23:42 +0000
I did a small-scale version of this in Python, to copy motor settings from one motor record to another:

import epics
def copyMotorSettings(fromMotor="xxx:m1", toMotor="xxx:m2"):
	motorFields = [".MRES", ".ERES", ".RRES", ".SREV", ".DIR", ".DHLM", ".DLLM", ".TWV",  
	".VBAS", ".VELO", ".ACCL", ".BDST", ".BVEL", ".BACC", ".RDBD", ".DESC",
	".EGU", ".RTRY", ".UEIP", ".URIP", ".DLY", ".RDBL", ".PREC", ".DISA",
	".DISP", ".FOFF", ".OFF", ".FRAC", ".OMSL", ".JVEL", ".JAR", ".VMAX",
	".PCOF", ".ICOF", ".DCOF", ".HVEL", ".NTM", ".NTMF", ".INIT", ".PREM",
	".POST", ".FLNK", ".RMOD"]
	for field in motorFields:
		val = epics.caget(fromMotor+field)
		epics.caput(toMotor+field, val)

An advantage of this strategy is that you have support for implementing moduleCopy(from,to) with multiple calls to channelCopy(from,to).  Also, it's pretty straightforward to implement verifyLastCopy(), and doing so gives you most of the infrastructure needed to implement undoLastCopy().

Tim Mooney ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


________________________________________
From: [email protected] [[email protected]] on behalf of [email protected] [[email protected]]
Sent: Saturday, March 12, 2016 4:49 AM
To: [email protected]
Subject: parametric PV save/restore

Hi,
my EPICS IOC has a set of PV of this format:

<MODULE_ID>:<CHANNEL_ID>:attr1
<MODULE_ID>:<CHANNEL_ID>:attr2
...
<MODULE_ID>:<CHANNEL_ID>:attr<n>

where <MODULE_ID> and <CHANNEL_ID> is inside 0...15 interval;

I'm looking for a "strategy" to give the operator
the feature of copy the setup of a module <x> to a module
<y> or copy a setup of a channel <x><c> to a channel <y><c>;

Thanks in advance,
Gennaro

--
Gennaro Tortone
INFN Napoli
Italy
tel: +39 81 676169

"Computer Science is no more about computers
     than astronomy is about telescopes."
     - Edsger Dijkstra


References:
parametric PV save/restore [email protected]

Navigate by Date:
Prev: RE: parametric PV save/restore Arnold, Ned D.
Next: RE: parametric PV save/restore [email protected]
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: parametric PV save/restore [email protected]
Next: Re: parametric PV save/restore Jack
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024