LabCA - EPICS/Channel Access Interface for Scilab and Matlab

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

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


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.


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




Known Issues

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


labCA is released under the EPICS Open License.

Old ChangeLog


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).


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.
labCA 3.4.2 released. A few minor fixes required to build under matlab 2014a. Thanks to Matthew Furseman for contributing the respective patch.
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.
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.

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.

Jim Sebek contributed a document addressing problems and work-arounds for building EPICS- and LABCA-3.1 on the WIN32 VISTA platform.

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…

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.

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.
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.

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.

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.

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