Experimental Physics and Industrial Control System
Here's an example from one of our beam lines
in the st.cmd file:
---------------% st.cmd %------------------------
# create the motor PVs
dbLoadTemplate("motor.substitutions")
#... later, after iocInit
# save other things every thirty seconds
create_monitor_set("auto_settings.req",30,"P=12ida2:")
-----------------------% end %------------------------
---------------% motor.substitutions %------------------------
file "$(MOTOR)/db/motor.db"
{
pattern
{P, N, M, DTYP, C, S, DESC, EGU, DIR, VELO, VBAS, ACCL,
BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT}
{12ida2:,1,"m$(N)","OMS MAXv",0,0,"motor $(N)","Angle Degree",Neg,
0.25, 0, 1, 0, 0.125, 1,5E-6,
8,2.1264,-26.8796,""}
{12ida2:,2,"m$(N)","OMS MAXv",0,1,"motor $(N)","Slide mm",Pos, 4,
0, 0.5, 0,0.689655, 1,0.00344827586206897,
8,352.2823,215.2823,""}
{12ida2:,3,"m$(N)","OMS MAXv",0,2,"motor $(N)","mm",Pos,0.130005,
0, 0.5, 0,0.130005, 1,0.000130009932758863,
8,14854.6,14853.6,""}
{12ida2:,4,"m$(N)","OMS MAXv",0,3,"motor $(N)","mm",Pos,0.0330033,
0, 0.5, 0,0.0330033, 1,3.3000033000033E-5,
8,102123.97,-87822.03,""}
{12ida2:,5,"m$(N)","OMS MAXv",0,4,"motor $(N)","mm",Pos, 0.4,
0, 0.25, 0, 0.4, 0.25,0.0004, 8,532.8156,-36.2838,""}
{12ida2:,6,"m$(N)","OMS MAXv",0,5,"motor $(N)","mm",Neg, 0.4,
0, 0.25, 0, 0.4, 0.25,0.0004, 8,94.793,-115.2106,""}
{12ida2:,7,"m$(N)","OMS MAXv",0,6,"motor $(N)","mm",Neg, 1,
0, 0.25, 0, 0.4, 0.25,0.0004, 8,89.001,-136.5194,""}
{12ida2:,8,"m$(N)","OMS MAXv",0,7,"motor $(N)","mm ",Pos, 1,
0, 0.25, 0, 0.4, 0.25,0.0004, 8,517.062,-15.19,""}
}
-----------------------% end %------------------------
---------------% auto_settings.req %------------------------
# Note: the macro P must have been supplied to the routine that parses
# this file. Normally, this means a command like the following is in st.cmd
# create_monitor_set("auto_settings.req",30,"P=12ida2:")
# This requires save_restore v2.8 or later.
file motor_settings.req P=$(P),M=m1
file motor_settings.req P=$(P),M=m2
file motor_settings.req P=$(P),M=m3
file motor_settings.req P=$(P),M=m4
file motor_settings.req P=$(P),M=m5
file motor_settings.req P=$(P),M=m6
file motor_settings.req P=$(P),M=m7
file motor_settings.req P=$(P),M=m8
-----------------------% end %------------------------
------------% $(MOTOR)/db/motor_settings.req %--------------
# FILE... motor_settings.req
# Version: $Revision$
# Modified By: $Author$
# Last Modified: $Date$
# HeadURL: $URL$
$(P)$(M).DIR
$(P)$(M).DHLM
$(P)$(M).DLLM
$(P)$(M).TWV
$(P)$(M).SREV
$(P)$(M).MRES
$(P)$(M).ERES
$(P)$(M).RRES
$(P)$(M).VBAS
$(P)$(M).VELO
$(P)$(M).ACCL
$(P)$(M).BDST
$(P)$(M).BVEL
$(P)$(M).BACC
$(P)$(M).RDBD
$(P)$(M).DESC
$(P)$(M).EGU
$(P)$(M).RTRY
$(P)$(M).UEIP
$(P)$(M).URIP
$(P)$(M).DLY
$(P)$(M).RDBL
$(P)$(M).PREC
$(P)$(M).DISA
$(P)$(M).DISP
$(P)$(M).FOFF
$(P)$(M).OFF
$(P)$(M).FRAC
$(P)$(M).OMSL
$(P)$(M).JVEL
$(P)$(M).JAR
$(P)$(M).VMAX
$(P)$(M).PCOF
$(P)$(M).ICOF
$(P)$(M).DCOF
$(P)$(M).HVEL
$(P)$(M).NTM
$(P)$(M).NTMF
$(P)$(M).INIT
$(P)$(M).PREM
$(P)$(M).POST
$(P)$(M).FLNK
$(P)$(M)_able.VAL
-----------------------% end %------------------------
hope this helps
On 6/7/2013 4:22 PM, Emmanuel Mayssat wrote:
------------------------------------------------------------------------
Date: Fri, 7 Jun 2013 14:47:11 -0500
From: [email protected]
Normally, I just include a line of the form
file <request file> <macro definitions>
for each database whose PVs I want autosaved.
I am not sure I understand.
where do you include that line?
Do you have a pointer on some docs or example?
--
E
--
----------------------------------------------------------
Pete R. Jemian, Ph.D. <[email protected]>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source, Argonne National Laboratory
Argonne, IL 60439 630 - 252 - 3189
-----------------------------------------------------------
Education is the one thing for which people
are willing to pay yet not receive.
-----------------------------------------------------------
- References:
- PV name change and autosave Emmanuel Mayssat
- Re: PV name change and autosave Tim Mooney
- RE: PV name change and autosave Emmanuel Mayssat
- Navigate by Date:
- Prev:
RE: PV name change and autosave Emmanuel Mayssat
- Next:
Re: PV name change and autosave Kevin Peterson
- 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
- Navigate by Thread:
- Prev:
RE: PV name change and autosave Emmanuel Mayssat
- Next:
Re: PV name change and autosave Kevin Peterson
- 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