Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <2020 Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <2020
<== Date ==> <== Thread ==>

Subject: RE: Arithmetic calculations before sending a command
From: Mark Rivers via Core-talk <core-talk@aps.anl.gov>
To: 'dmnr infn' <dmnrproject@gmail.com>, "core-talk@aps.anl.gov" <core-talk@aps.anl.gov>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
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 <tech-talk-bounces@aps.anl.gov> On Behalf Of dmnr infn via Tech-talk
Sent: Monday, January 20, 2020 10:48 AM
To: core-talk@aps.anl.gov; tech-talk@aps.anl.gov
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  <2020
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  <2020
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 ·