Introduction

The labCA package provides an interface to the EPICS channel access client library which can be integrated with the scilab or matlab applications. Both, scilab and matlab feature an API for interfacing to user binaries written in a programming language such as C or Fortran. labCA properly wraps the essential channel access routines and makes them accessible from the scilab1command line.

labCA actually uses an extra layer, the ezca library which transparently manages and caches channel access connections. A modified version of ezca comes with labCA, adding thread-safety and hence EPICS 3.14 fitness.

As of labCA version 3 further improvements to ezca have been made that exploit features of the multi-threaded CA library (EPICS 3.14/3.15/7 only) in order to speed up response time. Earlier versions always handed control to ezca in multiples of the labCA timeout, i.e., even if data from a channel were available quicker the library would wait until the next timeout quantum expired. Since version 3 a labCA call returns immediately after the underlying request completes.

A very convenient feature of labCA is the ability to execute ezca calls on groups of PVs, simply by passing the respective labCA routine a column vector of PV names.

labCA has been tested with EPICS 3.132, 3.14, 3.15, 7.0.4.1, scilab-2.7 .. scilab-6.1, matlab-6.5, matlab-7 (R2010a), matlab-2017b, matlab-2020b3on linux, solaris and win32/64. Note that while some of these combinations have been tested and been known working in the past, only the latest versions of the respective components have been tested and verified to build and run successfully with the current version of labCA under linux. Modifications to the Makefiles might be necessary to build older versions.

The current release of labCA supports the new scilab API and requires scilab-5.3 or newer.




Footnotes

...scilab1
throughout this text, references to scilab usually mean scilab or matlab.
... 3.132
Support for 3.13 has been dropped as of labCA version 3
...matlab-2020b3
A problem has been reported with matlab-2020b where matlab deadlocks during the initialization of labCA (under RHEL7). Known work- arounds are either building EPICS-base with thread-preemption disabled or using LD_PRELOAD to load EPICS libCom.so prior to starting matlab. Apparently, the deadlock caused by library initialization code calling pthread_join().