SLAC ESD Software Engineering Group
Stanford Linear Accelerator Center

EPICS Channel Archiver Data Provider Guide

SLAC Detailed
SLAC Computing
Software Home
Software Detailed

This page provides documentation for users and programmers of AIDA's EPICS Channel Archiver Data Provider. There are currently two EPICS Channel Archivers (one for LCLS and one for NLCTA) that are running and archiving data. There is also data available for a EPICS Channel Archiver that formerly collected data for the PEPII project. The EPICS Channel Archivers are capable of storing EPICS data at a faster rate than the SLC History buffer system.

See Also: Basic Users Guide to Aida, REF_AIDASHR

Users Guide

This section describes what an AIDA user should know about accessing EPICS Channel Archiver data through AIDA.For general information on using see Basic Users Guide to Aida, and the Aida javadoc, in particular the classes DaObject and DaReference (and DaReference's parent _DaReference) in aida.lib.da which form Aida's programming interface. One can also use Matlab.

Table 1: Summary of AIDA Data Provider for EPICS Channel Archiver Data

Acquires an array of the values of the named EPICS device, between some given STARTTIME and a given ENDTIME.
Status and limitations The data provider is complete and there are no known limitations.
Plan There are currently no plans for enhancements.

Schematic Matlab example using a DaReference and returning a DaValue
>> r = DaReference('VPIO:IN20:111:VRAW//HIST.lcls',da);
>> r.setParam('STARTTIME','07/31/2008 10:00:00');
>> r.setParam('ENDTIME','07/31/2008 10:10:00');
>> hist = r.getDaValue();
Java $CD_SOFT/ref/package/aida/test/java/
Matlab /afs/slac/g/cd/soft/slaconly/ref/package/aida/test/matlab/histDemo.m, this will work for either EPICS Archiver or SLC History data without modification for getting basic values and timestamps and plotting them. Also see this screenshot.
In addition, it is recommended to see /afs/slac/g/lcls/matlab/toolbox/aidaGetHistory.m and to use the function contained in this file, aidaGetHistory, for obtaining archiver data for a PV between a specified time range. Help information for this function can be obtained within Matlab using the standard Matlab SLAC setup by typing "help aidaGetHistory" at the Matlab prompt.

Types Description
EPICS Device Syntax <fields, separated by colons>//HIST.lcls
<fields, separated by colons>//HIST.nlcta
<fields, separated by colons>//HIST.pepii
Examples VPIO:IN20:111:VRAW//HIST.lcls
Instance Attributes
Attribute Description
HIST.subsystem The archived history of the EPICS device (d).
Methods Name Returns
getDaValue(d) DaValue containing a rectangular matrix of 5 arrays: [1,:] - the values (double); [2,:] - the times as strings "dd-mmm-yyyy hh:mm:ss" (matlab dateform '0', suitable for datenum); [3,:] repeat count; [4,:] the times as numeric timestamps in UNIX system time format; [5,:] the pulse id; [6,:] the count (1 for a scalar and greater than 1 for a waveform-- count may be used to index into the values array for waveforms to extract the waveform values for each sample, as shown in test 10 of; [7,:] a flag indicating whether the times represent Daylight Savings Time. Extract each array with methods of java.util.Vector such as get() (which DaValue extends).See examples above.

A CORBA Any, which should be extracted with edu.stanford.slac.aida.dp.dpSlc.
See example.

Arguments Name


Syntax Semantics


mm/dd/yyyy hh:mm:ss
The time from which you want values of the EPICS device named.
ENDTIME req as STARTTIME The time up-to which you want values of the EPICS device named.
DATEFORMAT opt DATEFORM0, MMDDYYYY, or MMDDYYYY_FRAC The format of the data time strings returned. DATEFORM0 is the default format: "dd-mmm-yyyy hh:mm:ss". MMDDYYYY is the format "mm/dd/yyyy hh:mm:ss". MMDDYYYY_FRAC is the format "mm/dd/yyyy hh:mm:ss.hh"
DENSITY opt SPARSE or NORMAL An indication of whether sparsified data may be retrieved. If SPARSE, sparsified data will be retrieved for any data in the specified time range older than the last two weeks and normal density data will be retrieved for any data in the last two weeks. If NORMAL, only normal density data will be retrieved for the specified time range. The default is SPARSE.


[SLAC ESD Software Engineering Group][ SLAC Home Page]

Author:  Bob Hall 17-May-2005
Modified by: Bob Hall 17-Aug-2007, Added description of new pulse id.
Modified by: Bob Hall 10-Sep-2007, Added description of new count field for waveforms.
Modified by: Bob Hall 31-Jul-2008, Added description of new optional INDEX parameter.
Modified by: Bob Hall 02-Aug-2008, Added description of new Daylight Savings Time flag.
Modified by: Bob Hall 13-Jan-2009, Removed description of obsolete INDEX parameter.
Modified by: Bob Hall 30-Mar-2010, Added description of new DENSITY parameter.
Modified by: Bob Hall 13-Apr-2010, Added description of matlab function aidaGetHistory.