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  <20152016  2017  2018  2019  2020  2021  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: SetVoltage problem
From: "Pearson, Matthew R." <[email protected]>
To: "[email protected]" <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Date: Thu, 10 Sep 2015 14:16:01 +0000
> 
> My Problem:  Let's say the current value (hardware device) is 8 V. If I I restart the IOC and put a new value like 10V i want to continiou ti increase 8, 9, 10V. But The after restarting the IOC my first Calc-Value is 0. 
> 

One way might be to write the current hardware value into the calcout record at IOC startup. 

You can also initialize the record that writes the value to the hardware with the hardware readback at IOC startup, by adding this to the write function in the stream protocol file:

setVoltage {
   out "SETV %f";
   @init { getVoltage; }
}

where getVoltage is the protocol function to read the current hardware setpoint. This is often what you want, since the hardware may have changed since the IOC was last running (so autosave won't help). Then you can read this record into the calcout record.

You might be able to do the ramp in database logic, but using SNL will give you more flexibility.

Cheers,
Matt



> 
> Current Value: 8V
> ‎SetVolt: 10V
> Calc: 0, 1, 2, 3, 4 ... 10. 
> 
> 
> Is there other possibility? And my second problem is I want to make a seq-record to increase after 30, 60 and 90 seconds.
> 
> For example (epics and css): 
> User Volt Selection: 1000V, 1500V and 2000V 
> User Slew Rate Option: 5V, 10V, 15V / per Time
> ‎Time: 30 seconds, 60 seconds, 90 seconds
> 
> 
> 
> record(ao, "SetVolt") {
> field(EGU, “V”)
> field(LOPR, “0”)
> field(HOPR, “28”)
> field(DRVH, “28”)
> field(DRVL, “0”)
> field(VAL, “0”)
> }
> 
> record(ai, "SetVoltReadback"){
> field(DTYP, “stream”)
> field(INP, "@xyz.proto read($(xyz)) $(device)")
> field(SCAN, “1 second”)
> field(FLNK, "VoltCalc PP")
> }
> 
> record(calcout, "VoltCalc") {
> field(DESC, “Write Voltag Out”)
> field(SCAN, “1 second”)
> field(CALC, "A:= ((C<(A-B)) ? (A-B) : ((A+B)>C ? C : (A+B)));A")
> 
> field(INPA, "VoltCalc.VAL")
> field(INPB, “SlewRate”) /* standard:1 */
> field(INPC, "SetVolt")
> 
> field(OUT, "WriteOut.VAL PP")
> field(OOPT, “On Change”)
> field(DOPT, “Use CALC”)
> }
> 
> 



References:
SetVoltage problem info22

Navigate by Date:
Prev: RE: SetVoltage problem Arnold, Ned D.
Next: caShellCommand in caQtDM Mezger Anton Christian (PSI)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: SetVoltage problem Arnold, Ned D.
Next: RE: SetVoltage problem info22
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·