Experimental Physics and
| |||||||||||||||
|
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,
| ||||||||||||||
ANJ, 23 Jan 2018 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |