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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Hardware simulator |
From: | Pavel Maslov <[email protected]> |
To: | "Steiner, Mathias" <[email protected]>, EPICS Tech Talk <[email protected]> |
Date: | Thu, 29 Aug 2013 15:10:52 +0200 |
Pavel,
This may be different than what you're looking for but..
I've found it helpful to have simulated power supplies with which to play before the real things are installed.
I've attached them below on the off-chance that they could be useful to someone.
Four records per PS provide "command set", "readback of set point", "readback of actual current", plus a helper calcout for ramping and noise.
Cheers -Mathias
# simulated power supply records for quadrupole magnets
record(ao, "$(sys)_$(sub):$(psnam)_$(inst):I_CSET")
{
field(DESC, "magnet power supply")
field(EGU, "A")
field(PREC, "1")
field(VAL, "0.0")
}
record(calc, "$(sys)_$(sub):$(psnam)_$(inst):I_RSET")
{
field(DESC, "simulated p/s set pt")
field(EGU, "A")
field(PREC, "1")
field(INPA, "$(sys)_$(sub):$(psnam)_$(inst):I_CSET PP NMS")
field(CALC, "A")
}
record(ai, "$(sys)_$(sub):$(psnam)_$(inst):I_RD")
{
field(DESC, "magnet power supply")
field(EGU, "A")
field(PREC, "1")
field(VAL, "0.0")
}
record(calcout, "$(sys)_$(sub):$(psnam)_$(inst):I_LAG")
{
field(DESC, "co mimics ramping ps")
field(EGU, "A")
field(PREC, "4")
field(INPA, "$(sys)_$(sub):$(psnam)_$(inst):I_CSET PP NMS")
field(INPB, "$(sys)_$(sub):$(psnam)_$(inst):I_RD PP NMS")
field(C, "5") # this determines how fast the p/s ramps..
field(CALC, "ABS(A-B)>C?B+(A-B)/ABS(A-B)*C:A+RNDM-.5")
# 1234567890123456789B123456789C123456789D beware the 40char(?) limit
field(DOPT, "Use CALC")
field(OUT, "$(sys)_$(sub):$(psnam)_$(inst):I_RD PP NMS")
field(SCAN, "1 second")
field(PINI, "1")
field(FLNK, "$(sys)_$(sub):$(psnam)_$(inst):I_RSET.PROC")
}