epics-labca

LabCA - EPICS/Channel Access Interface for Scilab and Matlab

Till Straumann <strauman/at/slac.stanford.edu>, 2002-2021. Last Modified: 2023/03/08.

Here comes yet another CA/EPICS interface. This one builds on top of a modified (thread-safe) version of libezca. This modified version comes with labCA.

The repository can be found here.

Recent Changes

2023/03/08:
labCA 3.8.1 released. This release supports matlab 2022a but is virtually identical to 3.8.0. The work-arounds necessary for 2020 are still required and they are now enabled for any release >= 2020 (3.8.0 made a specific exception for 2020 only).
2021/03/04:

labCA 3.8.0 released. This release supports scilab-6 (new scilab API – older versions are no longer supported).

Also, some work-arounds for matlab-2020b have been added. Note that using 2020b still requires special attention (see ReleaseNotes)

Also: labCA is now maintained on github.

2018/03/04:

labCA 3.7.2 released. This works around matlab 2017b crashing during initialization of labCA.

Note: This is a bugfix release, replacing 3.7.1 which has been retired (the tarball was incomplete, sorry). 3.7.2 also addresses issues in a windows environment without bash and other common unix tools.

Read the ReleaseNotes regarding a problem with matlab 2020b hanging during labCA initialization.

The key features of labCA

Supported Versions / Platforms

LabCA has been tested (note that not all combinations but usually the latest version of each component have been tested with the latest version of LabCA) with/on.

Operating Systems

EPICS Versions

Applications

Scilab
Matlab

Download

Known Issues

This document by Jim Sebek describes problems encountered when building labca-3.1 on MS windows vista and how they were addressed.

License

labCA is released under the EPICS Open License.

Old ChangeLog

2017/08/08:

labCA 3.5.1 released. lcaGet of DBF_LONG in native format resulted in an intermediate conversion to float and loss of precision (thanks to J. Vasquez for reporting).

To work around this bug it is possible to request such values explicity as DBF_DOUBLE (see lcaGet documentation).

2015/09/08:

labCA 3.5.0 released. A few minor fixes to build under base-3.15 (thanks to S. Gierman for reporting).

Also, there is now a new call:

  • lcaGetEnumStrings which allows you to retrieve the possible values of an enum-type PV.
2015/03/12:
labCA 3.4.2 released. A few minor fixes required to build under matlab 2014a. Thanks to Matthew Furseman for contributing the respective patch.
2013/06/25:
labCA 3.4.1 released. Still no new code. Just a bugfix in the build system which only affects builds for scilab under windows. Thanks to Takashi Obina for reporting and suggesting a fix.
2012/01/17:
labCA 3.4 released. This release contains no new code or bugfixes (I haven’t received any reports since 3.3) but addresses the build system, mostly under windows. It should now be possible to build labCA under a non-cygwin (i.e., plain command.com) environment. Note that blanks in paths still cause grief. It’s best to avoid them; for work-arounds consult the respective README in the distribution.
Tested under windows-64bit.
2010/06/07:

labCA 3.3 released. This release implements a few minor improvements:

  • lcaGetUnits(), lcaGet_xxx_Limits(), lcaGetPrecision() and lcaGetStatus() no longer transfer the full element count of an array. This speeds up these calls when working with a slow connection and it leaves these calls unaffected by EPICS_CA_MAX_ARRAY_BYTES.
  • added support for scilab-5
  • added help files for scilab-5.

3.3. also contains the additions already present in 3.2_beta, of course (there never was a 3.2 release):

  • Added entry points to read warning- and alarm-limits: lcaGetWarnLimits(), lcaGetAlarmLimits().

This is a source-only release, sorry.

2007/11/14:
Jim Sebek contributed a document addressing problems and work-arounds for building EPICS-3.14.8.2 and LABCA-3.1 on the WIN32 VISTA platform.
2007/10/13:

labca-3.1 released. This is a bugfix release. Greg Portmann discovered a memory leak in lcaGetNoWait(). If you frequently use this routine then you should upgrade. 3.1 also plugs memory leaks in the scilab interface but these are less critical (memory is only leaked in some cases where errors are reported but not during error-free operation).

Note that for the moment 3.1 is a source-code only release. I didn’t have time to build and thoroughly test on all platforms, sorry. However, I believe it is desirable to get the fix out there…

2007/6/11:
labca-3.0.beta released. This is a ‘new feature’ release:
  • labca no longer pends for CA activity in multiples of the labca timeout value. We now make full use of multi-threaded CA and return as soon as a labca command completes.
  • added lcaNewMonitorWait() call which blocks execution until all requested monitors have new data (or a timeout expires).
  • more consistent and informative error handling. All errors now can be handled with the try-catch-end and lasterror commands.

more details can be found in the ChangeLog file.

2007/6/11:
labca-2.1 released. This is a bugfix release:
  • lcaPutNoWait() didn’t flush CA queue.
  • use mexLock() to prevent labca from being unloaded from memory (matlab clear all would crash).
  • 64-bit portability fix
  • scilab got stuck during initialization in non-windowing mode.
2006/4/18:
labca-2.1.beta released:
  • PATH and LD_LIBRARY_PATH settings have slightly changed (see below and/or manual). Update your startup scripts etc. accordingly.
  • Ctrl-C handling should now be more stable and more portable. Platform-specific hacks have been abandoned in favor of (alas undocumented) hooks into matlab and scilab that poll for a pending Ctrl-C keypress. Older versions of labca don’t work correctly with matlab-7.2 on win32.
  • Fixed a problem with monitors that occurred when an IOC was rebooted.
  • Consult ChangeLog for more details.
2004/6/23:

labca-2.0.alpha released. The following new features were added:

  • lcaClear() allows you to clear/disconnect channels. Unconnected channels are automatically cleared to avoid annoying messages by 3.14 background threads. Adding this feature involved some additions to EZCA and therefore the version number was changed.
  • lcaSetMonitor() and lcaNewMonitorValue() were added (providing EZCA monitor functionality). Monitors are especially handy with EPICS 3.14 since data is automatically retrieved by background threads. matlab/scilab can process in the foreground while waiting for monitored data to change. Labca can be polled for new data with the lcaNewMonitorValue() call.
2004/4/2:

labca-1.5.beta released.

This release enables standard error handling in matlab. Prior releases didn’t throw errors because this would abort matlab7 on linux. The cause for this has now been discovered and is described in the ReleaseNotes.

2004/2/25:
labca-1.4.beta released; this release adds a matlab implementation to lcaGetStatus(). No other changes.