EZCA.pm - Perl extension for EPICS Easy Channel Access library (ezca)
use EZCA; EZCA::AutoErrorMessageOff(); EZCA::SetTimeout(0.1); EZCA::SetRetryCount(10);
$timeout = EZCA::GetTimeout(); $retry = EZCA::GetRetryCount(); print " timeout = $timeout Retry = $retry \n";
@data = EZCA::Get("S:SRsecsPastEpochAI","ezcaLong",1); print "Status = $data Value = $data \n";
EZCA::GetStatus("ID01:Gap",$tstamp,$tnstamp,$status,$severity); print "Time: $tstamp $tnstamp Status = $status Severity= $severity \n";
EZCA.pm is a perl interface to EPICS EZCA library. The routine names are based on EZCA nomenclature. Each routine name in EZCA has an equivalent in perl module. At this time 21 functions have been implemented and tested.
All the commands are similar to what is used in C version of EZCA. The various datatypes as described in EZCA (ezcatype) are used. They are as follows:
Most fucntion calls return status codes indicating the success/failure of the call. All other values are a indication of a problem. Following are the return codes.
Work in Progress:
@data = EZCA::Get($pvname,"ezcatype", $no_elem)
$pvnameand the data type is specified as ezcatype At this time the no of elements
$no_elemis limited to 2000. The return status code is stored in
$dataand the retrieved values are in the rest of the array starting at elements
$status = EZCA::GetControlLimits($pvname, $low, $high)
$statusis the return status.
$status = EZCA::GetGraphicLimits($pvname, $low, $high)
$statusis the return status.
$status = EZCA::GetNelem($pvname,$nelem)
$status = EZCA::GetPrecision($pvname,$prec)
$pvnameis returned in
$pvname. The time in seconds is in
$tstampand in nanoseconds is in
$tnstampAll times are since EPICS EPOCH. The
$severityreturns status of the pv and its severity.
$status = EZCA::GetUnits($pvname,$unit)
$status = EZCA::Put($pvname,"ezcatype",$no_elem,$data)
$pvname. The value is send in
$dataand the data type is specified as ezcatype. At this time the no of elements
$no_elemis limited to 1.
$status = EZCA::SetMonitor($pvname,"ezcatype")
$status = EZCA::ClearMonitor($pvname,"ezcatype")
$mon = EZCA::NewMonitorValue($pvname,"ezcatype")
$monindicates a new value since the last time the value was read a get call.
$status = EZCA::Delay($seconds)
$secondsis in seconds. Fractional time is allowed.
$stringBuffinstead of stdout.
$stringBuffused in the above call.
$seconds = EZCA::GetTimeout()
$number = EZCA::GetRetryCount()
$status = EZCA::SetTimeout($seconds)
$status = EZCA::SetRetryCount($number)
The software has been built on epics R3.13.9. The software is available as a gzipped tarfile
for solaris http://www.aps.anl.gov/aod/people/mohan/EZCA/solEZCA.tar.gz
for Linux http://www.aps.anl.gov/aod/people/mohan/EZCA/linuxEZCA.tar.gz
For building it standalone, some of the EPICS include files and libraries are included.
The EZCA perl module was written in 1996 by Mohan Ramanathan. However it was documented only in 2002. During these years the module has been extensively used and tested by the author. This module is used in numerous activities at the Advanced Photon Source.
For latest info contact the author Mohan Ramanathan email@example.com