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

Subject: Re: How can I collect data values
From: Dirk Zimoch <dirk.zimoch@psi.ch>
To: "Hu, Yong" <yhu@bnl.gov>
Cc: Kai Stein <kstein@ikp.tu-darmstadt.de>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Tue, 02 Oct 2012 15:42:25 +0200
Hu, Yong wrote:
Using "CP" in the input link of the compress CAN (WILL NOT fail to) fetch two consecutive samples with the same value IF the MDEL field of the longin record is set to "-1".The MDEL field is only available in some "numerical" records such as ai, ao, longin, longout.

Good to know.
Dirk


Yong

-----Original Message-----
From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Dirk Zimoch
Sent: Friday, September 28, 2012 3:35 AM
To: Kai Stein
Cc: tech-talk@aps.anl.gov
Subject: Re: How can I collect data values

Kai Stein wrote:
Hello,

I'm working on an automatic data analysis of electron beam (emittance measurement with a wire scanner and a magnetic lens) with EPICS. I get values from the hardware (self build measurement cards). The device support put the values into a longin records (this part is fixed, because it is already used for other applications).
I need to gather the values (will be a position and a corresponding
current) for a certain amount of time (approximately 1000 to 10000
values) and then hand it over to a subroutine, to perform the analysis (like fitting a curve onto the data). It should all run on a debian machine.

My problem is to collect the data with EPICS. I thought about collecting them somehow in a waveform record, but i have no idea, how to do this by using other records instead of the device support.


Best regards,

Kai Stein


If your longin processes once for each value "automatically", then the compress record is the easiest way. FLNK from the longin to the compress. (Or if that is not possible, use "CP" in the input link of the compress. But that will fail to fetch two consecutive samples with the same value.) Set NSAM to the maximum number of values you want to keep. You may set ALG="Circular Buffer". (If you want to average first, you may set N to the number of values that should be averaged into one sample value and set ALG="N to 1 Average".) After all values have been collected (you find the current filling in NUSE and can check it with a calcout record that you process with a FLNK from the compress) you can read VAL to get the array (probably filled up with 0 up to NSAM). Afterwards, write a 1 to RES to clear the array for the next measurement. The subroutine can be implemented in an aSub record (of if you have an older version of base with a genSub from SynApps).

If your longin does not process automatically but you have to trigger it and probably have to set other values in between two samples, then you should use the sscan record from SynApps.

Dirk




References:
How can I collect data values Kai Stein
Re: How can I collect data values Dirk Zimoch
RE: How can I collect data values Hu, Yong

Navigate by Date:
Prev: RE: Oxford CryoStream 700 support in EPICS? matthew.pearson
Next: aSub, EFLG, and array length changes Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
Navigate by Thread:
Prev: RE: How can I collect data values Hu, Yong
Next: EPICS Collaboration Meeting October 2012 : Agenda update Ilyou Kim
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·