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  2018  2019  <20202021  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  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: scaler record simulation
From: Mark Rivers via Tech-talk <[email protected]>
To: "'Koennecke Mark (PSI)'" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 14 Jan 2020 17:03:14 +0000
Hi Mark,

I wrote drvScalerSoft.c back in 2007.  I know that I tested it at the time, but I have not used it since, and I doubt if anyone else has either.

It is still built as part of the synApps std module, so it still compiles OK.

This is a message I sent to Tim Mooney at the time describing what I had done.  This may be the only documentation there is!

************************************************************
Tim,

I made some minor changes to devScalerAsyn in std.

I also added a new driver for devScalerAsyn, called drvScalerSoft.  This driver gets the scaler input values via database links.  It reads the database links each time device support is called to read the inputs.  It checks for counts > presets and issues a callback to indicate that counting is done if any preset is reached.

Since the scaler record does not provide input links for the Sn fields, I did it by assuming that each of the inputs is named using the same format.  One specifies this format when the driver is initialized:

drvScalerSoftConfigure("PilatusScaler", 16, "GSE-PILATUS1:ROI%dTotalCounts")

This creates an asyn port called PilatusScaler, with a 16 channels.  The last argument is the template for the names of the input PVs.  The %d gets substituted by the driver with a value from 1 to N, where N is 16 in this case.  We might be able to come up with a better way of defining the input link names so that it is more flexible (ideas?).

I think this could be useful for making non-scaler devices look like scalers.  The advantage of that is that applications (such as SPEC) know how to talk to scalers.  It makes less work writing macros, etc.

My initial application for this is for the Pilatus detector.  I want to be able to define N spatial regions of interest on the detector, and have the counts in these ROIs appear in 2 EPICS soft scaler records:  one will have total counts, one will have net counts.  An SNL program will do the work of reading the TIFF files as the Pilatus collects them, calculating the ROIs, and writing those to PVs that the scaler record will then read.  

I'm not sure it will be useful, but it might be so I've checked it into CVS.

Cheers,
Mark
************************************************************

I think that getting this to work will be the fastest approach for running the scaler record without real hardware.

Mark

-----Original Message-----
From: Tech-talk <[email protected]> On Behalf Of Koennecke Mark (PSI) via Tech-talk
Sent: Tuesday, January 14, 2020 10:39 AM
To: [email protected]
Subject: scaler record simulation

Hi,

I am in the process of setting up a simulation of an instrument in EPICS only. I already succeeded with the motors. But what is the best way to simulate the scaler record?

I have seen that there is a Soft Channel driver for the scaler record. Unfortunately I failed to find any documentation or an example initialization and usage of this one. Would this do the trick? Has anyone got an example of how to use it?

Another approach may be the base Asyn Scaler. Again, I failed to find documentation or an example how to use it. Is this an option?

Obviously I can write a simulation driver in C. I have done this already for a real device. But it seems not to be the easiest thing to do. And if I have to write the simulation as a driver, would any of the python device driver interfaces be useful in order to make this easier?

Best Regards,

     Mark Koennecke



Replies:
Re: scaler record simulation Jemian, Pete R. via Tech-talk
References:
scaler record simulation Koennecke Mark (PSI) via Tech-talk

Navigate by Date:
Prev: Re: CA_DISABLE_REPEATER Re: Killing caRepeater on Windows 10 J. Lewis Muir via Tech-talk
Next: RE: Killing caRepeater on Windows 10 Mark Rivers via Tech-talk
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  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: RE: scaler record simulation Kathryn Baker - UKRI STFC via Tech-talk
Next: Re: scaler record simulation Jemian, Pete R. via Tech-talk
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  2018  2019  <20202021  2022  2023  2024 
ANJ, 14 Jan 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·