EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 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: RE: Arithmetic calculations before sending a command
From: Mark Rivers via Core-talk <[email protected]>
To: 'dmnr infn' <[email protected]>, "[email protected]" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 20 Jan 2020 17:23:10 +0000

Ø  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.

 

Look at the documentation here: https://paulscherrerinstitute.github.io/StreamDevice/ao.html

 

For output formats using %f on the ao record you can use the ASLO and AOFF fields to scale the OVAL field.

 

Mark

 

 

 

 

From: Tech-talk <[email protected]> On Behalf Of dmnr infn via Tech-talk
Sent: Monday, January 20, 2020 10:48 AM
To: [email protected]; [email protected]
Subject: Arithmetic calculations before sending a command

 

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.


Navigate by Date:
Prev: Re: pvput JSON syntax Michael Davidsaver via Core-talk
Next: Jenkins build became unstable: epics-7.0 » linux32 #186 APS Jenkins via Core-talk
Index: 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: Re: pvput JSON syntax Mark Rivers via Core-talk
Next: Jenkins build became unstable: epics-7.0 » linux32 #186 APS Jenkins via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024