EPICS Controls Argonne National Laboratory

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  2016  2017  2018  2019  <20202021  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  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Arithmetic calculations before sending a command
From: dmnr infn via Tech-talk <[email protected]>
To: [email protected], [email protected]
Date: Mon, 20 Jan 2020 17:47:41 +0100
Hi everyone,
I have a DB with protocol in this manner:

record (ao, "RF:Setth_a0")
{
    field (DESC, "Setting threshold accelerator")
    field (DTYP, "stream")
    field (OUT,  "@MDO.proto setth_a0 $(PORT)")
    field (DRVL, "0")
    field (DRVH, "11230")
    field (LOPR, "0")
    field (HOPR, "11230")
    field (PREC, "0")
}

setth_a0 {
    out "SET VOLT %.0f";
}

With CS Studio I have a spinner associated to this PV, but when the user want send a value like 100 I want to send 10 to the device. How can I do this calculation before sending the value?
I tried SET VOLT (%.0f/10) but it doesn't work.
Thank you.

Replies:
RE: Arithmetic calculations before sending a command Mark Rivers via Tech-talk

Navigate by Date:
Prev: AW: ca-gateway 2.1.2 compilation error Sintschuk, Michael via Tech-talk
Next: RE: Arithmetic calculations before sending a command Mark Rivers via Tech-talk
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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: AW: ca-gateway 2.1.2 compilation error Sintschuk, Michael via Tech-talk
Next: RE: Arithmetic calculations before sending a command Mark Rivers via Tech-talk
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  <20202021  2022  2023  2024 
ANJ, 20 Jan 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·