Hi,
Perhaps it was discussed previously,
For a current measuring instrument (i404), I am setting measuring range from mbbo record.
record(mbbo, "$(Sys)$(Dev)Cmd:Rng-Sel") {
field(VAL, "1.0e-9")
field(ZRST, "1.0e-9")
field(ONST, "8.0e-9")
field(TWST, "1.0e-8")
field(THST, "1.0e-7")
field(FRST, "1.0e-6")
field(FVST, "1.0e-5")
field(SXST, "2.0e-5")
field(FLNK, "$(Sys)$(Dev)Cmd:Rng-Calc")
field(DESC, "SELECTION OF CURRENT RANGES")
}
record(calc, "$(Sys)$(Dev)Cmd:Rng-Calc") {
field(SCAN, "Passive")
field(A, "1.0e-9")
field(B, "8.0e-9")
field(C, "1.0e-8")
field(D, "1.0e-7")
field(E, "1.0e-6")
field(F, "1.0e-5")
field(G, "2.0e-5")
field(INPH, "$(Sys)$(Dev)Cmd:Rng-Sel")
field(CALC, "(H=0)?A:(H=1)?B:(H=2)?C:(H=3)?D:(H=4)?E:(H=5)?F:G")
field(FLNK, "$(Sys)$(Dev)Val:Rng-SP")
}
record(ao, "$(Sys)$(Dev)Val:Rng-SP") {
field(SCAN, "Passive")
field(FLNK, "$(Sys)$(Dev)Cmd:CapChk-Calcout")
field(OMSL, "closed_loop")
field(OIF, "Full")
field(DOL, "$(Sys)$(Dev)Cmd:Rng-Calc.VAL")
field(EGU, "A")
}
This seems to work quite well, but there has to be a better way than CALC 'switch'. Anyone has a better solution?
Kazimierz
- Replies:
- RE: calc question Mooney, Tim M.
- Navigate by Date:
- Prev:
Re: EPICS_TIMEZONE and TZ on RTEMS Matt Rippa
- Next:
RE: calc question Mooney, Tim M.
- 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: AW: Connection to Siemens S7 PLC Mueller, Joachim
- Next:
RE: calc question Mooney, Tim M.
- 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
|