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  <20182019  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  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: PV Scan - Set values
From: Anton Derbenev <[email protected]>
To: Pilar Gil Jaldo <[email protected]>, [email protected]
Date: Tue, 23 Jan 2018 04:13:28 -0500
Hello,

I had a similar necessity in order to create a simulation which would work much faster than availed by default SCAN capabilities - say, at 100 Hz.

The way I have accomplished that is by using a custom DBD for menuScan:

1) Get menuScan.dbd from EPICS Base and put it in your application *App/src folder.

2) Add the dbd in *App/src/Makefile by adding a line:

topoffsim_DBD += menuScan.dbd

3) Modify menuScan.dbd to your willing by adding extra choices. Say, for 50 Hz and 100 Hz I add two lines:

menu(menuScan) {
        choice(menuScanPassive,"Passive")
        choice(menuScanEvent,"Event")
        choice(menuScanI_O_Intr,"I/O Intr")
        # Periodic scans follow, ordered from slowest to fastest
        choice(menuScan10_second,"10 second")
        choice(menuScan5_second,"5 second")
        choice(menuScan2_second,"2 second")
        choice(menuScan1_second,"1 second")
        choice(menuScan_5_second,".5 second")
        choice(menuScan_2_second,".2 second")
        choice(menuScan_1_second,".1 second")
        choice(menuScan__2_second,".02 second")
        choice(menuScan__1_second,".01 second")
}

4) SCAN choices are numbered ascending from 0. 0 is "Passive", 1 is "Event", etc. So, in my database I can set the SCAN field to a corresponding integer value to use the scan rate defined in DBD:

record(mbbo, "$(P)SimRate-Sel") {
  field(DTYP, "Raw Soft Channel")
  field(ZRST, "1 second")
  field(ONST, "x5")
  field(TWST, "x10")
  field(THST, "x50")
  field(FRST, "x100")
  field(ZRVL, "6")
  field(ONVL, "8")
  field(TWVL, "9")
  field(THVL, "10")
  field(FRVL, "11")
  field(VAL, "0")
  field(PINI, "YES")
  field(OUT, "$(P)SimCounter-I.SCAN")
}

It worth mentioning that even though my simulation IOCs are relatively heavy on amount of computations they do (lots of chained waveform calculations and aSubs), they work very well even on x100 rate without any apparent issues. I don't know what is the lowest scan rate achievable with the described method though. I guess minimal reasonable value depends on an application.

Regards,
Anton.


On Tue, Jan 23, 2018 at 3:41 AM, Pilar Gil Jaldo <[email protected]> wrote:
Hello everybody,

I'm wondering if it is possible to change the scan value to a value below 0.1 second, which is the lowest value explained in the documentation.

If not, there is another way of changing this value below .1 second??

Thank you very much for your answer.

--
Pilar Gil Jaldo
Seven Solutions | Embedded SW Engineer
2, Periodista Rafael Gómez Montero. Edf. CETIC-UGR, Oficina 13 - Planta 1 18014, Granada - SPAIN
This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof are confidential and proprietary to Seven Solutions,S.L and/or its affiliates.
Without the prior written consent of Seven Solutions, this content may not (i) be disclosed to any third party, (ii) be reproduced, modified or otherwise used by anyone other than
current employees of Seven Solutions or its affiliates. If you are not the intended recipient or if this message has been received in error, please immediately notify us via e-mail and delete it.


Replies:
Re: PV Scan - Set values Ralph Lange

Navigate by Date:
Prev: PV Scan - Set values Pilar Gil Jaldo
Next: Re: How to work with motor record position counts larger than 2147483648? Torsten Bögershausen
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: PV Scan - Set values J. Lewis Muir
Next: Re: PV Scan - Set values Ralph Lange
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 23 Jan 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·