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  <20122013  2014  2015  2016  2017  2018  2019  2020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Problems with SIS38XX and scaler record AutoCount in MCA R7-1
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "J. Lewis Muir" <jlmuir@imca-cat.org>, "'matthew.pearson@diamond.ac.uk'" <matthew.pearson@diamond.ac.uk>, "Pedersen, UK (Ulrik)" <ulrik.pedersen@diamond.ac.uk>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 28 May 2012 20:08:06 +0000
Folks,

Lewis Muir pointed out 2 problems with the database record DisableAutoCount in SIS38XX.template in mca R7-1.

The first problem is that the INPA link should be $(P)AcquireMode, not $(P)Mode.

The second problem is that the logic is reversed.  It writes to the $(SCALER).CONT field when switching from MCS to Scaler mode, but it should be the opposite, setting .CONT to 0 when switching to MCS mode.  Changing the CALC field to "A" fixes this problem.

corvette:mca/mcaApp/Db>svn diff
Index: SIS38XX.template
===================================================================
--- SIS38XX.template    (revision 13803)
+++ SIS38XX.template    (working copy)
@@ -207,8 +207,8 @@
 }

 record(calcout, "$(P)DisableAutoCount") {
-  field(CALC, "A==1?0:1")
-  field(INPA, "$(P)Mode")
+  field(CALC, "A")
+  field(INPA, "$(P)AcquireMode")
   field(OUT,  "$(SCALER).CONT")
   field(OOPT, "Transition To Zero")

I have tested this revised version.  It does set .CONT to OneShot when the AcquireMode is changed to MCS from Scaler.  However, it only does this successfully if the scaler is not currently counting.  If the scaler is currently counting (either due to a normal count cycle or an autocount cycle) it does not work.  This is because the driver rejects any MCS operation if the unit is acquiring in scaler mode.

I can't see how it is possible to do what we want with a simple database.  But I seem to recall that Diamond said they had a database that did it?  I can't seem to find that database, though Matt or Ulrik probably sent it to me.

My feeling is that it is important to have MCS acquisition stop the scaler, and temporarily turn off AutoCount, then turn it back on (if it was on) when MCS acquisition completes.  It seems to me that this will probably have to be done in the SNL program:

When MCS operations are done:
- Save .CONT field
- Set .CONT to OneShot
- Stop scaler
- Start MCS

When MCS operations complete:
- Restore .CONT field

Is there is simpler way to do this?

Mark





Navigate by Date:
Prev: Proposed change in asyn - request for comments Mark Rivers
Next: CSS-BOY combo boxes Christian Roehrig
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: Re: Proposed change in asyn - request for comments Bruce Hill
Next: CSS-BOY combo boxes Christian Roehrig
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·