EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Insertion Devices Control and EPICS
From: Rok Sabjan <[email protected]>
To: Juraj Krempasky <[email protected]>
Cc: Bob Dalesio <[email protected]>, [email protected]
Date: Fri, 12 Dec 2003 15:36:56 +0100
Hello,

thank you Juraj, but this actually is not what I was aiming for. The quesition was regarding the motor control of the opposite motors on each side of the gap. By specifications, they have to synchronized to a maximum difference (distance from center) of 5 microns at all times. The speeds are also quite big - up to several mm per second. This somehow in my opinion disqualifies a template solution.

Cheers,
Rok


Hello,


we driveID (or two IDs in the case of dual undulators) with a monochromator using the sscan record combined with the busy record. The point is, that if the busy record is rised upon an activation of an sscan positioner, the sscan is blocked until 'somebody' resets the busy record. This 'somebody' could be a calcout record like:

record(calcout,"$(P):alldone"){
field(SCAN,"Passive")
field(INPA,"$(P)withID1:STATUS CP NMS")
field(INPB,"$(P)withID2:STATUS CP NMS")
field(INPC,"$(PGM):dmov CP NMS")
field(CALC,"A=1&&B=1&&C=1")
field(OCAL,"0")
field(OOPT,"Transition To Non-zero")
field(DOPT,"Use OCAL")
# <--- here the busy is reset
field(OUT,"$(P):busy PP")
}


and if you put the $(P)-E:GO transform record below as a positioner in you sscan


# select here what to un synchronously
record(mbbo,"$(P)-E:OPT"){
        field(ZRST,"PGM")
        field(ONST,"PGM+ID1")
        field(TWST,"PGM+ID2")
        field(THST,"PGM+ID1+ID2")
        field(DOL,"0")
        field(PINI,"YES")
}

record(transform,"$(P)-E:GO") {
        field(PREC,"3")
        field(CLCA,"a")
        field(CLCB,"1")
        field(CLCC,"a")
        field(OUTA,"$(P):energy PP")
#      set the busy record to 'busy'
        field(OUTB,"$(P):busy PP")
        field(OUTC,"$(P)-E:GOPGM PP")
}

# this is the monochromator +ID1 + ID2 energy PV
record(ai,"$(P):energy")
{
        field(PREC,"3")
}

record(seq,"$(P)-E:GOPGM"){
       field(SELM, "All")
       field(DOL1,"$(P):energy")
       field(LNK1,"$(PGM):energy PP")
       field(DO2,"1")
       field(LNK2,"$(PGM):setE.PROC")
       field(DO3,"1")
       field(LNK3,"$(P)-E:GOID1.PROC")
}

record(calcout,"$(P)-E:GOID1") {
field(INPA,"$(P):energy")
# <-- use INPC if there is an energy shift between the mono and ID1
field(INPC,"0")
field(INPB,"$(P)-E:OPT")
field(CALC,"B=1||B=3?1:0")
field(OOPT,"When Non-zero")
field(DOPT,"Use OCAL")
field(OCAL,"A+C")
field(OUT,"$(BML)-ID1:ENERGY PP")
field(FLNK,"$(P)-E:GOID2")


record(calcout,"$(P)-E:GOID2") {
field(INPA,"$(P):energy")
# <-- if INPC if there is an energy shift between the mono and ID2
field(INPC,"0")
field(INPB,"$(P)-E:OPT")
field(CALC,"B=2||B=3?1:0")
field(OOPT,"When Non-zero")
field(DOPT,"Use OCAL")
field(OCAL,"A+C")
field(OUT,"$(BML)-ID2:ENERGY PP")
}



################################################### # checking up the ID1/ID2 status for $(P)alldone # considering the E-OPT: i.e whether the ID1/ID2 is # scanned allong with the mono or not ###################################################

record(calc,"$(P)withID1:STATUS") {
       field(SCAN,"Passive")
       field(INPA,"$(BML)-ID1:STATUS CP NMS")
       field(INPB,"$(P)-E:OPT CP NMS")
#                               +-+--------- 0 means ID1 done
       field(CALC,"B=1||B=3?(A=0?1:0):1")
}
record(calc,"$(P)withID2:STATUS") {
       field(SCAN,"Passive")
       field(INPA,"$(BML)-ID2:STATUS CP NMS")
       field(INPB,"$(P)-E:OPT CP NMS")
#                               +-+--------- 0 means ID2 done
       field(CALC,"B=2||B=3?(A=0?1:0):1")
}
####################################################


and if you handle separately the "done" state of the monochromator, ID1, ID2, you get a general template based solution to synchronous scans.


Cheers




_____
Swiss / / [email protected]
_/_/_/ _/ _/_/_/ /____ Experimental Division
_/ _/ _/ Source / Paul Scherrer Institute _/_/ _/ _/_/ ____/ CH-5232 Villigen-PSI
_/_/Light _/ / Tel: ++41 56 310 5131
_/_/_/_/_/_/_/ _/_/_/___/ Fax: ++41 56 310 3151





References:
Re: Insertion Devices Control and EPICS Bob Dalesio
Re: Insertion Devices Control and EPICS Juraj Krempasky

Navigate by Date:
Prev: Re: Insertion Devices Control and EPICS Juraj Krempasky
Next: Re: Insertion Devices Control and EPICS Mohan Ramanathan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  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: Insertion Devices Control and EPICS Juraj Krempasky
Next: Re: Insertion Devices Control and EPICS David Maden
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·